Class: Montrose::Rule::NthDayOfYear::YearDay
- Inherits:
-
Object
- Object
- Montrose::Rule::NthDayOfYear::YearDay
- Defined in:
- lib/montrose/rule/nth_day_of_year.rb
Instance Method Summary collapse
- #first_wday ⇒ Object
-
#initialize(time) ⇒ YearDay
constructor
A new instance of YearDay.
- #nth_day ⇒ Object
- #total_days ⇒ Object
Constructor Details
#initialize(time) ⇒ YearDay
Returns a new instance of YearDay.
39 40 41 |
# File 'lib/montrose/rule/nth_day_of_year.rb', line 39 def initialize(time) @time = time end |
Instance Method Details
#first_wday ⇒ Object
47 48 49 |
# File 'lib/montrose/rule/nth_day_of_year.rb', line 47 def first_wday @time.beginning_of_year.wday end |
#nth_day ⇒ Object
43 44 45 |
# File 'lib/montrose/rule/nth_day_of_year.rb', line 43 def nth_day @time.yday end |
#total_days ⇒ Object
51 52 53 |
# File 'lib/montrose/rule/nth_day_of_year.rb', line 51 def total_days days_in_year(@time) end |