class TZInfo::DayOfYearTransitionRule
:nodoc:
@private
@abstract
the year.
A base class for transition rules that activate based on an integer day of
def ==(r)
-
(Boolean)
- `true` if `r` is a {DayOfYearTransitionRule} with the
Parameters:
-
r
(Object
) -- the instance to test for equality.
def ==(r) super(r) && r.kind_of?(DayOfYearTransitionRule) && @seconds == r.seconds end
def hash_args
def hash_args [@seconds] + super end
def initialize(day, transition_at)
-
(ArgumentError)
- if `day` is not an `Integer`. -
(ArgumentError)
- if `transition_at` is not an `Integer`.
Parameters:
-
transition_at
(Integer
) -- the time in seconds after midnight local -
day
(Integer
) -- the day of the year on which the transition occurs.
Other tags:
- Private: -
Other tags:
- Abstract: -
def initialize(day, transition_at) super(transition_at) raise ArgumentError, 'Invalid day' unless day.kind_of?(Integer) @seconds = day * 86400 end