class Montrose::Rule::NthDayOfYear::YearDay
Public Class Methods
Source
# File lib/montrose/rule/nth_day_of_year.rb, line 37 def initialize(time) @time = time end
Public Instance Methods
Source
# File lib/montrose/rule/nth_day_of_year.rb, line 45 def first_wday @time.beginning_of_year.wday end
Source
# File lib/montrose/rule/nth_day_of_year.rb, line 49 def total_days days_in_year(@time) end
Private Instance Methods
Source
# File lib/montrose/rule/nth_day_of_year.rb, line 56 def days_in_year(time) date = time.to_date ((date + 1.year) - date).to_i end
Get the days in the month for +time