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 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
#child, #keys, #locale, #namespace
Instance Method Summary collapse
Methods inherited from Border
Methods included from Parts::Resource
#[], #^, _instance, _setup_, _setup_info, base_uri, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #parent, #registered?, root_dir
Methods included from Parts::Resource::Pool
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class When::Parts::Resource
Instance Method Details
#border(date = [], clock = When::UTC) ⇒ Array<Numeric>
Note:
属性 @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 |