Module: When::Ephemeris::ChineseTrueLunation::MethodS
- Includes:
- JujiMethods
- Defined in:
- lib/when_exe/region/chinese.rb
Overview
授時暦の平均太陽の計算
Instance Method Summary collapse
-
#cn_to_time_(cn, time0 = nil) ⇒ Numeric
周期番号 -> 日時(平気).
-
#time_to_cn(t, cn0 = nil) ⇒ Numeric
日時 -> 周期番号.
Methods included from JujiMethods
#_perihelion_, #_winter_solstice_, #_year_length_
Instance Method Details
#cn_to_time_(cn, time0 = nil) ⇒ Numeric
周期番号 -> 日時(平気)
524 525 526 527 |
# File 'lib/when_exe/region/chinese.rb', line 524 def cn_to_time_(cn, time0=nil) year, mean_term = (cn / 12.0 - @longitude_shift - @year_epoch).divmod(1) @day_epoch + _winter_solstice(year) + _year_length_(year) * mean_term end |