Class: When::CalendarNote::Japanese::SolarTermsRevised

Inherits:
SolarTerms show all
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

Constants inherited from When::CalendarNote

Bahai, CalendarDepend, Chinese, CommonWithRokuyo, CommonWithSovietFiveDay, CommonWithSovietSixDay, Default, When::CalendarNote::Javanese, When::CalendarNote::JulianDay, Mayan, Tibetan, Yis

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

#event

Attributes inherited from TM::ReferenceSystem

#domain_of_validity

Attributes inherited from BasicTypes::Object

#label

Attributes included from Parts::Resource

#child, #keys, #locale, #namespace

Instance Method Summary collapse

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

#domain, #name

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

#[], #[]=, #_setup_

Dynamic Method Handling

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

Instance Method Details

#position(date, delta = 0) ⇒ Array<Integer>

日付に対応する座標

Parameters:

Returns:

  • (Array<Integer>)

    Array< Integer, 0 or 1 or 2 >

    Integer

    対応する座標

    0 or 1 or 2

    座標の進み(0 なら 没, 2 なら滅)



1543
1544
1545
1546
1547
1548
# File 'lib/when_exe/region/japanese/notes.rb', line 1543

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