Class: TZInfo::OffsetTimezonePeriod
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
TimezonePeriod
|
|
Instance Chain:
self,
TimezonePeriod
|
|
Inherits: |
TZInfo::TimezonePeriod
|
Defined in: | lib/tzinfo/offset_timezone_period.rb |
Overview
Represents the infinite period of time in a time zone that constantly observes the same offset from UTC (has an unbounded start and end).
Class Method Summary
-
.new(offset) ⇒ OffsetTimezonePeriod
constructor
Initializes an
OffsetTimezonePeriod
.
TimezonePeriod
- Inherited
.new | Initializes a |
Instance Attribute Summary
TimezonePeriod
- Inherited
Instance Method Summary
-
#==(p) ⇒ Boolean
(also: #eql?)
Determines if this
OffsetTimezonePeriod
is equal to another instance. - #end_transition ⇒ TimezoneTransition
-
#eql?(p)
Alias for #==.
- #hash ⇒ Integer
- #start_transition ⇒ TimezoneTransition
TimezonePeriod
- Inherited
#abbr | Alias for TimezonePeriod#abbreviation. |
#abbreviation | The abbreviation that identifies this offset. |
#base_utc_offset | Returns the base offset from UTC in seconds ( |
#end_transition, | |
#ends_at | Returns the UTC end time of the period or |
#local_ends_at | Returns the local end time of the period or |
#local_starts_at | Returns the local start time of the period or |
#observed_utc_offset | Returns the observed offset from UTC in seconds ( |
#start_transition, | |
#starts_at | Returns the UTC start time of the period or |
#std_offset | Returns the offset from the time zone's standard time in seconds ( |
#utc_offset | Alias for TimezonePeriod#base_utc_offset. |
#utc_total_offset | Alias for TimezonePeriod#observed_utc_offset. |
#zone_identifier | Alias for TimezonePeriod#abbreviation. |
#raise_not_implemented | Raises a |
#timestamp, #timestamp_with_offset |
Constructor Details
.new(offset) ⇒ OffsetTimezonePeriod
Initializes an OffsetTimezonePeriod
.
# File 'lib/tzinfo/offset_timezone_period.rb', line 11
def initialize(offset) super end
Instance Method Details
#==(p) ⇒ Boolean
Also known as: #eql?
Determines if this OffsetTimezonePeriod
is equal to another instance.
# File 'lib/tzinfo/offset_timezone_period.rb', line 32
def ==(p) p.kind_of?(OffsetTimezonePeriod) && offset == p.offset end
#end_transition ⇒ TimezoneTransition
# File 'lib/tzinfo/offset_timezone_period.rb', line 23
def end_transition nil end
#eql?(p)
Alias for #==.
# File 'lib/tzinfo/offset_timezone_period.rb', line 35
alias eql? ==
#hash ⇒ Integer
# File 'lib/tzinfo/offset_timezone_period.rb', line 38
def hash offset.hash end
#start_transition ⇒ TimezoneTransition
# File 'lib/tzinfo/offset_timezone_period.rb', line 17
def start_transition nil end