Class: When::TimeStandard::TimeStandard
- Inherits:
-
BasicTypes::Object
- Object
- BasicTypes::Object
- When::TimeStandard::TimeStandard
- Includes:
- When::TimeStandard
- Defined in:
- lib/when_exe/timestandard.rb
Overview
時刻系のひながた
Direct Known Subclasses
LocalApparentTime, LocalMeanTime, MartianTimeCoordinated, UniversalTime
Constant Summary collapse
- Ratio =
1.0
Constants included from When::TimeStandard
DeltaT, DeltaT0, DeltaThreshold, TAI_UTC, YearThreshold
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 BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Instance Method Summary collapse
-
#from_dynamical_date(date) ⇒ Numeric
dynamical date を当該時刻系の日付に変換する.
-
#from_dynamical_time(time) ⇒ Numeric
dynamical time を universal time に変換する.
-
#from_time_object(time) ⇒ Numeric
Time オブジェクトを universal time に変換する.
-
#has_leap? ⇒ Boolean
当該時刻系に閏秒があるか?.
-
#rate_of_clock ⇒ Numeric
時間の歩度.
-
#to_dynamical_date(date) ⇒ Numeric
当該時刻系の日付を dynamical date に変換する.
-
#to_dynamical_time(time) ⇒ Numeric
universal time を dynamical time に変換する.
-
#to_time_object(time) ⇒ ::Time
universal time を Time オブジェクトに変換する.
Methods included from When::TimeStandard
_is_systemtime_universal?, _leap_seconds, _setup_, _setup_info, delta_t, delta_t_coordinated, delta_t_observed, delta_t_observed_nasa, delta_t_observed_poly, from_dynamical_time, from_time_object, to_dynamical_time, to_time_object
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
Methods included from Parts::Resource::Pool
#[], #[]=, #_pool, #_setup_, #pool_keys
Methods included from Parts::Resource::Synchronize
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class When::Parts::Resource
Instance Method Details
#from_dynamical_date(date) ⇒ Numeric
dynamical date を当該時刻系の日付に変換する
466 467 468 469 470 |
# File 'lib/when_exe/timestandard.rb', line 466 def from_dynamical_date(date) When::TM::JulianDate._t_to_d( from_dynamical_time( When::TM::JulianDate._d_to_t(+date))) end |
#from_dynamical_time(time) ⇒ Numeric
dynamical time を universal time に変換する
444 445 446 |
# File 'lib/when_exe/timestandard.rb', line 444 def from_dynamical_time(time) When::TimeStandard.from_dynamical_time(time) end |
#from_time_object(time) ⇒ Numeric
Time オブジェクトを universal time に変換する
478 479 480 |
# File 'lib/when_exe/timestandard.rb', line 478 def from_time_object(time) from_dynamical_time(When::TimeStandard.from_time_object(time)) end |
#has_leap? ⇒ Boolean
当該時刻系に閏秒があるか?
496 497 498 |
# File 'lib/when_exe/timestandard.rb', line 496 def has_leap? false end |
#rate_of_clock ⇒ Numeric
時間の歩度
504 505 506 |
# File 'lib/when_exe/timestandard.rb', line 504 def rate_of_clock self.class::Ratio end |
#to_dynamical_date(date) ⇒ Numeric
当該時刻系の日付を dynamical date に変換する
454 455 456 457 458 |
# File 'lib/when_exe/timestandard.rb', line 454 def to_dynamical_date(date) When::TM::JulianDate._t_to_d( to_dynamical_time( When::TM::JulianDate._d_to_t(+date))) end |
#to_dynamical_time(time) ⇒ Numeric
universal time を dynamical time に変換する
434 435 436 |
# File 'lib/when_exe/timestandard.rb', line 434 def to_dynamical_time(time) When::TimeStandard.to_dynamical_time(time) end |
#to_time_object(time) ⇒ ::Time
universal time を Time オブジェクトに変換する
488 489 490 |
# File 'lib/when_exe/timestandard.rb', line 488 def to_time_object(time) When::TimeStandard.to_time_object(to_dynamical_time(time)) end |