Class: When::Coordinates::DayBorder
- Inherits:
-
Border
- Object
- BasicTypes::Object
- Border
- When::Coordinates::DayBorder
- Defined in:
- lib/when_exe/coordinates.rb
Overview
日時要素の境界 - 日の出,日の入り
Constant Summary
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
Constants included from Namespace
Namespace::DC, Namespace::DCQ, Namespace::DCT, Namespace::FOAF, Namespace::OWL, Namespace::RDF, Namespace::RDFC, Namespace::RDFS, Namespace::RSS, Namespace::XSD
Instance Attribute Summary
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Instance Method Summary collapse
Methods inherited from Border
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, #parent, #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
#_date_adjust(source) ⇒ Object
日付の補正
2054 2055 2056 |
# File 'lib/when_exe/coordinates.rb', line 2054 def _date_adjust(source) source * 1 + @border[0] * 0 end |
#border(date = [], clock = When::UTC) ⇒ Array<Numeric>
属性 @event によって境界を計算する (see Ephemeris::Formula#day_event)
境界の取得
2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 |
# File 'lib/when_exe/coordinates.rb', line 2036 def border(date=[], clock=When::UTC) return @border unless date[0] && clock.formula time = clock._number_to_coordinates(clock.second * clock.time_standard.from_dynamical_time( When::TM::JulianDate._d_to_t( clock.formula.first.day_event( clock.time_standard.to_dynamical_date(date[0] + @border[0]*0), @event, When.Resource('_ep:Sun'), @height )))) time[0] += When::TM::JulianDate::JD19700101 time[0] = When::Coordinates::Pair.new(time[0]-@border[0]*0, @border[0]*0) unless @border[0]*0 == 0 clock._encode(time, false) end |