Module: When::Parts::Timezone::Base

Included in:
When::Parts::Timezone, TM::Clock, V::Timezone
Defined in:
lib/when_exe/parts/timezone.rb

Overview

When::V::Timezone と Qhwn::Parts::Timezone の抽象基底

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#daylightWhen::TM::Clock (readonly)

夏時間帯の時計

Returns:



28
29
30
# File 'lib/when_exe/parts/timezone.rb', line 28

def daylight
  @daylight
end

#standardWhen::TM::Clock (readonly)

標準時間帯の時計

Returns:



24
25
26
# File 'lib/when_exe/parts/timezone.rb', line 24

def standard
  @standard
end

#tz_differenceWhen::TM:IntervalLength (readonly)

夏時間帯と標準時間帯の時間差

Returns:

  • (When::TM:IntervalLength)


32
33
34
# File 'lib/when_exe/parts/timezone.rb', line 32

def tz_difference
  @tz_difference
end

Instance Method Details

#^(date, options = {}) ⇒ When::TM::DateAndTime, When::TM::JulianDate

When::TM::TemporalPosition の時間帯を変更して複製する



41
42
43
44
45
46
# File 'lib/when_exe/parts/timezone.rb', line 41

def ^(date, options={})
  date    = When::TM::Position.any_other(date, options)
  options = date._attr.merge({:clock=>self}).merge(options)
  return When::TM::JulianDate.dynamical_time(date.dynamical_time, options) unless date.frame.kind_of?(When::TM::Calendar)
  date.frame.jul_trans(When::TM::JulianDate.dynamical_time(date.dynamical_time), options)
end