Module: WdayOrd

Included in:
DateTime, Time
Defined in:
lib/temporals/ruby_ext.rb

Instance Method Summary collapse

Instance Method Details

#wday_lastObject



51
52
53
# File 'lib/temporals/ruby_ext.rb', line 51

def wday_last
  'last' if day.to_i + 7 > Date.new(year, month, -1).day
end

#wday_ordObject



48
49
50
# File 'lib/temporals/ruby_ext.rb', line 48

def wday_ord
  (day.to_f / 7).ceil
end