class TZInfo::DayOfMonthTransitionRule
def get_day(offset, year)
Experimental RBS support (using type sampling data from the type_fusion
project).
def get_day: (TZInfo::TimezoneOffset offset, Integer year) -> Time
This signature was generated using 2 samples from 1 application.
-
(Time)
- midnight local time on the day specified by the rule for
Parameters:
-
year
(Integer
) -- the year in which the transition occurs. -
offset
(TimezoneOffset
) -- the current offset at the time of the
def get_day(offset, year) candidate = Time.new(year, month, @offset_start, 0, 0, 0, offset.observed_utc_offset) diff = day_of_week - candidate.wday if diff < 0 candidate + (7 + diff) * 86400 elsif diff > 0 candidate + diff * 86400 else candidate end end