class TZInfo::DayOfWeekTransitionRule

:nodoc:
@private
@abstract
given week (subclasses specify which week of the month).
A base class for rules that transition on a particular day of week of a

def ==(r)

Returns:
  • (Boolean) - `true` if `r` is a {DayOfWeekTransitionRule} with the

Parameters:
  • r (Object) -- the instance to test for equality.
def ==(r)
  super(r) && r.kind_of?(DayOfWeekTransitionRule) && @month == r.month && @day_of_week == r.day_of_week
end

def hash_args

(see TransitionRule#hash_args)
def hash_args
  [@month, @day_of_week] + super
end

def initialize(month, day_of_week, transition_at)

Raises:
  • (ArgumentError) - if `day_of_week` is less than 0 or greater than 6.
  • (ArgumentError) - if `day_of_week` is not an `Integer`.
  • (ArgumentError) - if `month` is less than 1 or greater than 12.
  • (ArgumentError) - if `month` is not an `Integer`.
  • (ArgumentError) - if `transition_at` is not an `Integer`.

Parameters:
  • transition_at (Integer) -- the time in seconds after midnight local
  • day_of_week (Integer) -- the day of the week when the transition
  • month (Integer) -- the month of the year when the transition occurs.

Other tags:
    Private: -

Other tags:
    Abstract: -
def initialize(month, day_of_week, transition_at)
  super(transition_at)
  raise ArgumentError, 'Invalid month' unless month.kind_of?(Integer) && month >= 1 && month <= 12
  raise ArgumentError, 'Invalid day_of_week' unless day_of_week.kind_of?(Integer) && day_of_week >= 0 && day_of_week <= 6
  @month = month
  @day_of_week = day_of_week
end

def is_always_first_day_of_year?

Returns:
  • (Boolean) - `false`.
def is_always_first_day_of_year?
  false
end

def is_always_last_day_of_year?

Returns:
  • (Boolean) - `false`.
def is_always_last_day_of_year?
  false
end