Class: When::CalendarTypes::LocalTime

Inherits:
UTC show all
Defined in:
lib/when_exe/calendartypes.rb

Overview

Abstract Local Time

Direct Known Subclasses

LAT, LMT, THS

Constant Summary

Constants inherited from TM::Clock

TM::Clock::HashProperty

Constants included from When::Coordinates

When::Coordinates::Bahai, When::Coordinates::Chinese, When::Coordinates::Common, When::Coordinates::DefaultDateIndices, When::Coordinates::DefaultDayIndex, When::Coordinates::DefaultTimeIndices, When::Coordinates::Indian, When::Coordinates::Iranian, When::Coordinates::Javanese, When::Coordinates::MATCH, When::Coordinates::Mayan, When::Coordinates::PERIOD, When::Coordinates::PERIOD_NAME, When::Coordinates::PRECISION, When::Coordinates::PRECISION_NAME, When::Coordinates::Russian, When::Coordinates::Tibetan, When::Coordinates::VALUE, When::Coordinates::Yi

Constants included from Parts::Resource

Parts::Resource::ConstList, Parts::Resource::ConstTypes, Parts::Resource::IRIDecode, Parts::Resource::IRIDecodeTable, Parts::Resource::IRIEncode, Parts::Resource::IRIEncodeTable, Parts::Resource::IRIHeader, Parts::Resource::LabelProperty

Instance Attribute Summary

Attributes inherited from TM::Clock

#date_basis, #reference_event, #reference_time, #second, #time_standard, #tz_prop, #utc_reference

Attributes included from Parts::Timezone::Base

#daylight, #standard, #tz_difference

Attributes inherited from TM::ReferenceSystem

#domain_of_validity, #position

Attributes inherited from BasicTypes::Object

#label

Attributes included from Parts::Resource

#_pool, #child, #keys, #locale, #namespace

Instance Method Summary collapse

Methods inherited from UTC

#clk_trans, #utc_trans

Methods inherited from TM::Clock

#_arrange_length, #_coordinates_to_number, #_daylight, _local_time, #_need_validate, #_number_to_coordinates, #_precision, #_round_value, _setup_, _setup_info, #_to_hash_value, #clk_trans, #daylight, get_clock, get_clock_option, is_local_time_set?, local_time, local_time=, #location, #rate_of_clock, #standard, #to_basic, #to_clk_time, to_hms, #to_universal_time, #tz_difference, #tzname, #utc_trans

Methods included from Parts::Resource::Pool

#[], #[]=, #_pool, #_setup_, #pool_keys

Methods included from Parts::Resource::Synchronize

#synchronize

Methods included from Parts::Timezone::Base

#^

Methods included from When::Coordinates

to_deg, to_deg_225, to_dms

Methods inherited from TM::ReferenceSystem

#domain, #name

Methods included from Parts::Resource

#[], #^, _abbreviation_to_iri, _decode, _encode, _extract_prefix, _instance, _instantiate, _parse, _path_with_prefix, _replace_tags, _setup_, _setup_info, _simplify_path, base_uri, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #next, #parent, #prev, #registered?, root_dir

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class When::Parts::Resource

Instance Method Details

#to_local_time(clk_time, sdn = nil) ⇒ Numeric

この時法の時刻を128秒単位の実数に変換する

Parameters:

  • clk_time (Array<Numeric>)
  • sdn (Integer) (defaults to: nil)

    参照事象の通し番号(ダミー)

Returns:



99
100
101
# File 'lib/when_exe/calendartypes.rb', line 99

def to_local_time(clk_time, sdn=nil)
  super - universal_time(sdn)
end

#universal_time(sdn = nil) ⇒ Numeric

128秒単位の実数による参照事象の時刻

Fraction time of the reference event

Parameters:

  • sdn (Integer) (defaults to: nil)

    参照事象の通し番号

Returns:

  • (Numeric)

    T00:00:00Z からの参照事象の経過時間 / 128秒



86
87
88
89
90
# File 'lib/when_exe/calendartypes.rb', line 86

def universal_time(sdn=nil)
  return super - @time_standard.localtime_difference unless sdn
  time = When::TM::JulianDate._d_to_t(sdn-0.5)
  @time_standard.to_dynamical_time(time) - When::TimeStandard.to_dynamical_time(time)
end

#zoneString

Zone 名

Returns:



108
109
110
# File 'lib/when_exe/calendartypes.rb', line 108

def zone
  iri.split('/')[-1]
end