class Montrose::Rule::NthDayOfMonth::MonthDay

Public Class Methods

new(time) click to toggle source
# File lib/montrose/rule/nth_day_of_month.rb, line 37
def initialize(time)
  @time = time
end

Public Instance Methods

first_wday() click to toggle source
# File lib/montrose/rule/nth_day_of_month.rb, line 45
def first_wday
  @time.beginning_of_month.wday
end
nth_day() click to toggle source
# File lib/montrose/rule/nth_day_of_month.rb, line 41
def nth_day
  @time.mday
end
total_days() click to toggle source
# File lib/montrose/rule/nth_day_of_month.rb, line 49
def total_days
  ::Montrose::Utils.days_in_month(@time.month, @time.year)
end