Class: When::CalendarNote::Japanese::SolarTermsRevised
- Inherits:
-
SolarTerms
- Object
- BasicTypes::Object
- TM::Object
- TM::ReferenceSystem
- When::CalendarNote
- LuniSolarPositions
- SolarTerms
- SolarTerms
- When::CalendarNote::Japanese::SolarTermsRevised
- Defined in:
- lib/when_exe/region/japanese/notes.rb
Overview
太陽黄経による暦注
Constant Summary collapse
- DoyoShift =
土用策
When::TM::PeriodDuration.new([0,0,12.1747411317])
Constants inherited from SolarTerms
When::CalendarNote::Japanese::SolarTerms::Notes10, When::CalendarNote::Japanese::SolarTerms::Notes12, When::CalendarNote::Japanese::SolarTerms::Notes60_A, When::CalendarNote::Japanese::SolarTerms::Notes60_B, When::CalendarNote::Japanese::SolarTerms::Notes72, When::CalendarNote::Japanese::SolarTerms::Patch
Constants inherited from When::CalendarNote
Bahai, CalendarDepend, Chinese, CommonWithRokuyo, CommonWithSovietFiveDay, CommonWithSovietSixDay, Default, HashProperty, When::CalendarNote::Javanese, When::CalendarNote::JulianDay, Mayan, Tibetan, Yis
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 LuniSolarPositions
#delta, #den, #formula, #margin, #num
Attributes inherited from When::CalendarNote
Attributes inherited from TM::ReferenceSystem
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Instance Method Summary collapse
-
#event_time(date, event_name, event) ⇒ Object
イベント日付(時刻付).
-
#position(date, delta = 0) ⇒ Array<Integer>
日付に対応する座標.
Methods inherited from SolarTerms
Methods inherited from LuniSolarPositions
_setup_, _setup_info, #event_eval
Methods inherited from When::CalendarNote
#copy, #day, #duration, #enum_for, #include?, #month, #note?, #notes, #year
Methods inherited from TM::ReferenceSystem
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
#event_time(date, event_name, event) ⇒ Object
イベント日付(時刻付)
1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 |
# File 'lib/when_exe/region/japanese/notes.rb', line 1536 def event_time(date, event_name, event) return super if date.most_significant_coordinate >= 1869 etime = term(date + When.Duration('P3D'), [-15,30], When::SYSTEM) + DoyoShift if formula.respond_to?(:year_length) && formula.denominator && formula.denominator < 100000 fraction = etime.clk_time.local_time fraction += When::TM::Duration::DAY * (etime.to_i - date.to_i) fraction = (fraction / When::TM::Duration::DAY * formula.denominator * 1000 + 0.5).floor / 1000.0 fraction = fraction.to_i if fraction == fraction.to_i event_name + "(#{fraction}/#{formula.denominator})" else etime.events = [event_name] etime end end |
#position(date, delta = 0) ⇒ Array<Integer>
日付に対応する座標
1525 1526 1527 1528 1529 1530 |
# File 'lib/when_exe/region/japanese/notes.rb', line 1525 def position(date, delta=0) return super if date.most_significant_coordinate >= 1869 date = date.floor p0, p1 = [date, date.succ].map {|d| (30.0 * @formula.time_to_cn(d-DoyoShift) - @margin + 12).floor} [p1 % @den, p1 - p0] end |