class TZInfo::Format1::TimezoneDefiner

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/tzinfo/format1/timezone_definer.rbs

class TZInfo::Format1::TimezoneDefiner < TZInfo::Format1::Format2::TimezoneDefiner
  def offset: (Symbol id, Integer base_utc_offset, Integer std_offset, (String | Symbol) abbreviation, Integer utc_offset) -> untyped
  def transition: (Integer year, Integer month, Symbol offset_id, Integer timestamp_value, ?Integer? datetime_numerator, ?Integer? datetime_denominator) -> untyped
end

:nodoc:
@private
transitions of the time zone to be specified.
format 1 modules by {TimezoneDefinition} to allow the offsets and
Instances of {Format1::TimezoneDefiner} are yielded to TZInfo::Data

def offset(id, utc_offset, std_offset, abbreviation)

Experimental RBS support (using type sampling data from the type_fusion project).

def offset: (Symbol id, Integer base_utc_offset, Integer std_offset, (String | Symbol) abbreviation, Integer utc_offset) -> untyped

This signature was generated using 11 samples from 1 application.

Raises:
  • (ArgumentError) - if another offset has already been defined with

Parameters:
  • abbreviation (Symbol) -- an abbreviation for the offset, for
  • std_offset (Integer) -- the daylight savings offset from the base
  • utc_offset (Integer) -- the base offset from UTC of the zone in
  • id (Symbol) -- an arbitrary value used identify the offset in
def offset(id, utc_offset, std_offset, abbreviation)
  super(id, utc_offset, std_offset, abbreviation.to_s)
end

def transition(year, month, offset_id, timestamp_value, datetime_numerator = nil, datetime_denominator = nil)

Experimental RBS support (using type sampling data from the type_fusion project).

def transition: (Integer year, Integer month, Symbol offset_id, Integer timestamp_value, ?Integer? datetime_numerator, ?Integer? datetime_denominator) -> untyped

This signature was generated using 263 samples from 1 application.

Raises:
  • (ArgumentError) - if `datetime_numerator` is specified, but
  • (ArgumentError) - if `timestamp_value` is not greater than the
  • (ArgumentError) - if `offset_id` does not reference a defined

Parameters:
  • datetime_denominator (Integer) -- the time of the transition as the
  • datetime_numerator (Integer) -- the time of the transition as the
  • timestamp_value (Integer) -- the time the transition occurs as an
  • offset_id (Symbol) -- references the id of a previously defined
  • month (Integer) -- the UTC month in which the transition occurs.
  • year (Integer) -- the UTC year in which the transition occurs. Used
def transition(year, month, offset_id, timestamp_value, datetime_numerator = nil, datetime_denominator = nil)
  raise ArgumentError, 'DateTime-only transitions are not supported' if datetime_numerator && !datetime_denominator
  super(offset_id, timestamp_value)
end