zakuro 0.1.4 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/doc/gengou.md +22 -22
  3. data/doc/operation/csv/month.csv +447 -202
  4. data/doc/operation/operation.xlsx +0 -0
  5. data/lib/zakuro/calculation/base/operated_year.rb +114 -0
  6. data/lib/zakuro/calculation/base/year.rb +3 -0
  7. data/lib/zakuro/calculation/cycle/abstract_remainder.rb +44 -19
  8. data/lib/zakuro/calculation/monthly/abstract_lunar_phase.rb +169 -0
  9. data/lib/zakuro/calculation/monthly/first_day.rb +1 -1
  10. data/lib/zakuro/calculation/monthly/operated_month.rb +47 -3
  11. data/lib/zakuro/calculation/range/full_range.rb +1 -1
  12. data/lib/zakuro/calculation/range/medieval_annual_range.rb +105 -0
  13. data/lib/zakuro/calculation/range/operated_range.rb +61 -16
  14. data/lib/zakuro/calculation/stella/lunar/abstract_location.rb +78 -0
  15. data/lib/zakuro/calculation/stella/lunar/choukei_value.rb +71 -0
  16. data/lib/zakuro/calculation/stella/solar/abstract_average.rb +117 -0
  17. data/lib/zakuro/calculation/stella/solar/abstract_location.rb +187 -0
  18. data/lib/zakuro/calculation/stella/solar/choukei_value.rb +136 -0
  19. data/lib/zakuro/calculation/type/old_float.rb +69 -0
  20. data/lib/zakuro/era/japan/reki.rb +1 -1
  21. data/lib/zakuro/era/japan/yaml/set-001-until-south.yaml +22 -22
  22. data/lib/zakuro/operation/month/type.rb +58 -0
  23. data/lib/zakuro/operation/yaml/month.yaml +7840 -0
  24. data/lib/zakuro/version/context.rb +1 -1
  25. data/lib/zakuro/version/daien/const/number.rb +55 -0
  26. data/lib/zakuro/version/daien/const/remainder.rb +53 -0
  27. data/lib/zakuro/version/daien/cycle/remainder.rb +59 -0
  28. data/lib/zakuro/version/daien/cycle/solar_term.rb +34 -0
  29. data/lib/zakuro/version/daien/daien.rb +36 -0
  30. data/lib/zakuro/version/daien/monthly/lunar_phase.rb +106 -0
  31. data/lib/zakuro/version/daien/range/annual_range.rb +39 -0
  32. data/lib/zakuro/version/daien/stella/lunar/adjustment.rb +240 -0
  33. data/lib/zakuro/version/daien/stella/lunar/localization.rb +44 -0
  34. data/lib/zakuro/version/daien/stella/lunar/location.rb +80 -0
  35. data/lib/zakuro/version/daien/stella/lunar/value.rb +75 -0
  36. data/lib/zakuro/version/daien/stella/origin/average_november.rb +34 -0
  37. data/lib/zakuro/version/daien/stella/origin/lunar_age.rb +62 -0
  38. data/lib/zakuro/version/daien/stella/origin/winter_solstice.rb +55 -0
  39. data/lib/zakuro/version/daien/stella/solar/adjustment.rb +93 -0
  40. data/lib/zakuro/version/daien/stella/solar/average.rb +98 -0
  41. data/lib/zakuro/version/daien/stella/solar/interval.rb +108 -0
  42. data/lib/zakuro/version/daien/stella/solar/location.rb +61 -0
  43. data/lib/zakuro/version/daien/stella/solar/value.rb +36 -0
  44. data/lib/zakuro/version/gihou/const/number.rb +55 -0
  45. data/lib/zakuro/version/gihou/const/remainder.rb +54 -0
  46. data/lib/zakuro/version/gihou/cycle/remainder.rb +56 -0
  47. data/lib/zakuro/version/gihou/cycle/solar_term.rb +34 -0
  48. data/lib/zakuro/version/gihou/gihou.rb +23 -2
  49. data/lib/zakuro/version/gihou/monthly/lunar_phase.rb +106 -0
  50. data/lib/zakuro/version/gihou/range/annual_range.rb +39 -0
  51. data/lib/zakuro/version/gihou/stella/lunar/adjustment.rb +250 -0
  52. data/lib/zakuro/version/gihou/stella/lunar/localization.rb +44 -0
  53. data/lib/zakuro/version/gihou/stella/lunar/location.rb +80 -0
  54. data/lib/zakuro/version/gihou/stella/lunar/value.rb +75 -0
  55. data/lib/zakuro/version/gihou/stella/origin/average_november.rb +34 -0
  56. data/lib/zakuro/version/gihou/stella/origin/lunar_age.rb +62 -0
  57. data/lib/zakuro/version/gihou/stella/origin/winter_solstice.rb +55 -0
  58. data/lib/zakuro/version/gihou/stella/solar/adjustment.rb +93 -0
  59. data/lib/zakuro/version/gihou/stella/solar/average.rb +97 -0
  60. data/lib/zakuro/version/gihou/stella/solar/interval.rb +108 -0
  61. data/lib/zakuro/version/gihou/stella/solar/location.rb +61 -0
  62. data/lib/zakuro/version/gihou/stella/solar/value.rb +36 -0
  63. data/lib/zakuro/version/senmyou/const/number.rb +51 -0
  64. data/lib/zakuro/version/senmyou/const/remainder.rb +47 -0
  65. data/lib/zakuro/version/senmyou/cycle/remainder.rb +5 -12
  66. data/lib/zakuro/version/senmyou/cycle/solar_term.rb +4 -1
  67. data/lib/zakuro/version/senmyou/monthly/lunar_phase.rb +36 -155
  68. data/lib/zakuro/version/senmyou/range/annual_range.rb +7 -135
  69. data/lib/zakuro/version/senmyou/stella/lunar/adjustment.rb +237 -0
  70. data/lib/zakuro/version/senmyou/stella/lunar/localization.rb +44 -0
  71. data/lib/zakuro/version/senmyou/stella/lunar/location.rb +87 -0
  72. data/lib/zakuro/version/senmyou/stella/lunar/value.rb +67 -0
  73. data/lib/zakuro/version/senmyou/stella/origin/average_november.rb +34 -0
  74. data/lib/zakuro/version/senmyou/stella/origin/lunar_age.rb +62 -0
  75. data/lib/zakuro/version/senmyou/stella/origin/winter_solstice.rb +55 -0
  76. data/lib/zakuro/version/senmyou/stella/solar/adjustment.rb +93 -0
  77. data/lib/zakuro/version/senmyou/stella/solar/average.rb +97 -0
  78. data/lib/zakuro/version/senmyou/stella/solar/interval.rb +103 -0
  79. data/lib/zakuro/version/senmyou/stella/solar/location.rb +61 -0
  80. data/lib/zakuro/version/senmyou/stella/solar/value.rb +39 -0
  81. data/lib/zakuro/version/version_class_resolver.rb +8 -0
  82. data/lib/zakuro/version.rb +1 -1
  83. data/lib/zakuro/version_factory.rb +1 -1
  84. metadata +62 -8
  85. data/lib/zakuro/version/senmyou/stella/lunar_orbit.rb +0 -332
  86. data/lib/zakuro/version/senmyou/stella/solar_average.rb +0 -169
  87. data/lib/zakuro/version/senmyou/stella/solar_location.rb +0 -213
  88. data/lib/zakuro/version/senmyou/stella/solar_orbit.rb +0 -213
  89. data/lib/zakuro/version/senmyou/stella/winter_solstice.rb +0 -106
  90. data/lib/zakuro/version/taien/taien.rb +0 -19
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../../calculation/stella/solar/abstract_average'
4
+
5
+ require_relative '../../const/remainder'
6
+
7
+ require_relative '../../cycle/solar_term'
8
+
9
+ require_relative '../origin/winter_solstice'
10
+
11
+ require_relative './location'
12
+
13
+ # :nodoc:
14
+ module Zakuro
15
+ # :nodoc:
16
+ module Daien
17
+ # :nodoc:
18
+ module Solar
19
+ #
20
+ # Average 平気(太陽軌道平均)
21
+ #
22
+ class Average < Calculation::Solar::AbstractAverage
23
+ #
24
+ # 初期化
25
+ #
26
+ # @param [Integer] western_year 西暦年
27
+ #
28
+ def initialize(western_year:)
29
+ solar_term = Average.first_solar_term(western_year: western_year)
30
+ super(solar_term: solar_term)
31
+ end
32
+
33
+ #
34
+ # 冬至から数えた1年データの月ごとに二十四節気を割り当てる
35
+ #
36
+ # @param [Array<Month>] annual_range 1年データ
37
+ #
38
+ # @return [Array<Month>] 1年データ
39
+ #
40
+ def set(annual_range:)
41
+ super(annual_range: annual_range)
42
+ end
43
+
44
+ #
45
+ # 計算開始する二十四節気を求める
46
+ #
47
+ # @param [Integer] western_year 西暦年
48
+ #
49
+ # @return [SolarTerm] 二十四節気
50
+ #
51
+ def self.first_solar_term(western_year:)
52
+ # 天正冬至
53
+ winter_solstice = Origin::WinterSolstice.get(western_year: western_year)
54
+
55
+ # 二十四節気(冬至)
56
+ solar_term = Cycle::SolarTerm.new(index: 0, remainder: winter_solstice)
57
+
58
+ first_solar_term_index = Average.calc_fist_solar_term_index(western_year: western_year)
59
+
60
+ # 対象の二十四節気まで戻す
61
+ solar_term.prev_by_index(first_solar_term_index)
62
+
63
+ solar_term
64
+ end
65
+
66
+ # :reek:TooManyStatements { max_statements: 6 }
67
+
68
+ #
69
+ # 計算開始する二十四節気番号を求める
70
+ #
71
+ # * 前提として入定気は冬至の手前にある
72
+ # * 例えば、定気が大雪であれば入定気は大雪の範囲内にある
73
+ # * 入定気は、定気の開始位置に重複しない限り、常に定気より後にある
74
+ # * 基本的に定気の一つ前から起算すれば、当時から求めた11月(閏10/閏11月)に二十四節気を割り当てられる
75
+ #
76
+ # @param [Integer] western_year 西暦年
77
+ #
78
+ # @return [Integer] 二十四節気番号
79
+ #
80
+ def self.calc_fist_solar_term_index(western_year:)
81
+ # 天正閏余
82
+ lunar_age = Origin::LunarAge.get(western_year: western_year)
83
+
84
+ solar_location = Solar::Location.new(lunar_age: lunar_age)
85
+ solar_location.run
86
+
87
+ solar_term_index = solar_location.index
88
+
89
+ # 入定気の一つ後の二十四節気まで戻す(ただし11月経朔が二十四節気上にある場合は戻さない)
90
+ # NOTE: 789年で大余0のパターンあり
91
+ solar_term_index += 1 unless solar_location.remainder.day.zero?
92
+
93
+ solar_term_index
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,108 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ module Zakuro
5
+ # :nodoc:
6
+ module Daien
7
+ # :nodoc:
8
+ module Solar
9
+ #
10
+ # Interval 入気定日加減数(二十四節気の間隔)
11
+ #
12
+ module Interval
13
+ #
14
+ # 気策の 15-664.7 を加減する
15
+ #
16
+ # @note 『歴代天文律暦等志彙編 七』中華書房 p.2224 盈縮分の行で加減した
17
+ #
18
+ # @return [Hash<Symbol, Cycle::Remainder>] 一覧
19
+ MAP = {
20
+ # 冬至(とうじ)・大雪(たいせつ)
21
+ touji: Cycle::Remainder.new(day: 14, minute: 1351, second: 7), # -2353
22
+ taisetsu: Cycle::Remainder.new(day: 14, minute: 1351, second: 7),
23
+ # 小寒(しょうかん)・小雪(しょうせつ)
24
+ shoukan: Cycle::Remainder.new(day: 14, minute: 1859, second: 7), # -1845
25
+ shousetsu: Cycle::Remainder.new(day: 14, minute: 1859, second: 7),
26
+ # 大寒(だいかん)・立冬(りっとう)
27
+ daikan: Cycle::Remainder.new(day: 14, minute: 2314, second: 7), # -1390
28
+ rittou: Cycle::Remainder.new(day: 14, minute: 2314, second: 7),
29
+ # 立春(りっしゅん)・霜降(そうこう)
30
+ risshun: Cycle::Remainder.new(day: 14, minute: 2728, second: 7), # -976
31
+ soukou: Cycle::Remainder.new(day: 14, minute: 2728, second: 7),
32
+ # 雨水(うすい)・寒露(かんろ)
33
+ usui: Cycle::Remainder.new(day: 15, minute: 76, second: 7), # -588
34
+ kanro: Cycle::Remainder.new(day: 15, minute: 76, second: 7),
35
+ # 啓蟄(けいちつ)・秋分(しゅうぶん)
36
+ keichitsu: Cycle::Remainder.new(day: 15, minute: 450, second: 7), # -214
37
+ shuubun: Cycle::Remainder.new(day: 15, minute: 450, second: 7),
38
+ # 春分(しゅんぶん)・白露(はくろ)
39
+ shunbun: Cycle::Remainder.new(day: 15, minute: 878, second: 7), # +214
40
+ hakuro: Cycle::Remainder.new(day: 15, minute: 878, second: 7),
41
+ # 清明(せいめい)・処暑(しょしょ)
42
+ seimei: Cycle::Remainder.new(day: 15, minute: 1252, second: 7), # +588
43
+ shosho: Cycle::Remainder.new(day: 15, minute: 1252, second: 7),
44
+ # 穀雨(こくう)・立秋(りっしゅう)
45
+ kokuu: Cycle::Remainder.new(day: 15, minute: 1640, second: 7), # +976
46
+ risshuu: Cycle::Remainder.new(day: 15, minute: 1640, second: 7),
47
+ # 立夏(りっか)・大暑(たいしょ)
48
+ rikka: Cycle::Remainder.new(day: 15, minute: 2054, second: 7), # +1390
49
+ taisho: Cycle::Remainder.new(day: 15, minute: 2054, second: 7),
50
+ # 小満(しょうまん)・小暑(しょうしょ)
51
+ shouman: Cycle::Remainder.new(day: 15, minute: 2509, second: 7), # +1845
52
+ shousho: Cycle::Remainder.new(day: 15, minute: 2509, second: 7),
53
+ # 芒種(ぼうしゅ)・夏至(げし)
54
+ boushu: Cycle::Remainder.new(day: 15, minute: 3017, second: 7), # +2353
55
+ geshi: Cycle::Remainder.new(day: 15, minute: 3017, second: 7)
56
+ }.freeze
57
+
58
+ # @return [Array<Remainder>] 索引
59
+ LIST = [
60
+ MAP[:touji], # 0
61
+ MAP[:shoukan], # 1
62
+ MAP[:daikan], # 2
63
+ MAP[:risshun], # 3
64
+ MAP[:usui], # 4
65
+ MAP[:keichitsu], # 5
66
+ MAP[:shunbun], # 6
67
+ MAP[:seimei], # 7
68
+ MAP[:kokuu], # 8
69
+ MAP[:rikka], # 9
70
+ MAP[:shouman], # 10
71
+ MAP[:boushu], # 11
72
+ MAP[:geshi], # 12
73
+ MAP[:shousho], # 13
74
+ MAP[:taisho], # 14
75
+ MAP[:risshuu], # 15
76
+ MAP[:shosho], # 16
77
+ MAP[:hakuro], # 17
78
+ MAP[:shuubun], # 18
79
+ MAP[:kanro], # 19
80
+ MAP[:soukou], # 20
81
+ MAP[:rittou], # 21
82
+ MAP[:shousetsu], # 22
83
+ MAP[:taisetsu] # 23
84
+ ].freeze
85
+
86
+ #
87
+ # 入気定日加減数を引き当てる
88
+ #
89
+ # @param [Integer] index 二十四節気番号
90
+ #
91
+ # @return [Cycle::Remainder] 入気定日加減数
92
+ #
93
+ def self.index_of(index)
94
+ LIST[index]
95
+ end
96
+
97
+ #
98
+ # 入気定日加減数の総数を返す
99
+ #
100
+ # @return [Integer] 入気定日加減数の総数
101
+ #
102
+ def self.size
103
+ LIST.size
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../../calculation/stella/solar/abstract_location'
4
+
5
+ require_relative '../../const/remainder'
6
+
7
+ require_relative './interval'
8
+
9
+ # :nodoc:
10
+ module Zakuro
11
+ # :nodoc:
12
+ module Daien
13
+ # :nodoc:
14
+ module Solar
15
+ #
16
+ # Location 入定気
17
+ #
18
+ class Location < Calculation::Solar::AbstractLocation
19
+ # @return [Cycle::Remainder] 弦
20
+ QUARTER = Const::Remainder::Solar::QUARTER
21
+
22
+ #
23
+ # 初期化
24
+ #
25
+ # @param [Cycle::Remainder] lunar_age 天正閏余(大余小余)
26
+ #
27
+ def initialize(lunar_age:)
28
+ super(lunar_age: lunar_age, quarter: QUARTER)
29
+ end
30
+
31
+ # :reek:UtilityFunction
32
+
33
+ #
34
+ # 二十四節気番号に対応する入気定日加減数を返す
35
+ #
36
+ # @note 継承のためクラスメソッドにしない
37
+ #
38
+ # @param [Integer] index 二十四節気番号
39
+ #
40
+ # @return [Cycle::Remainder] 入気定日加減数
41
+ #
42
+ def interval(index:)
43
+ Interval.index_of(index)
44
+ end
45
+
46
+ # :reek:UtilityFunction
47
+
48
+ #
49
+ # 入気定日加減数の要素数を返す
50
+ #
51
+ # @note 継承のためクラスメソッドにしない
52
+ #
53
+ # @return [Integer] 入気定日加減数の要素数
54
+ #
55
+ def interval_size
56
+ Interval.size
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../../calculation/stella/solar/choukei_value'
4
+
5
+ require_relative '../../const/number'
6
+
7
+ require_relative './adjustment'
8
+
9
+ # :nodoc:
10
+ module Zakuro
11
+ # :nodoc:
12
+ module Daien
13
+ # :nodoc:
14
+ module Solar
15
+ #
16
+ # Value 太陽補正値
17
+ #
18
+ module Value
19
+ #
20
+ # 太陽の運行による補正値を算出する
21
+ #
22
+ # @param [SolarTerm] solar_location 入定気
23
+ #
24
+ # @return [Integer] 補正値
25
+ #
26
+ def self.get(solar_location:)
27
+ remainder = solar_location.remainder
28
+
29
+ row = Adjustment.specify(index: solar_location.index)
30
+
31
+ Calculation::Solar::ChoukeiValue.get(remainder: remainder, row: row)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ module Zakuro
5
+ # :nodoc:
6
+ module Gihou
7
+ #
8
+ # Const 定数
9
+ #
10
+ module Const
11
+ #
12
+ # Number 数値
13
+ #
14
+ module Number
15
+ #
16
+ # Cycle 周期
17
+ #
18
+ module Cycle
19
+ # @return [Integer] 総法(1日=1340分)
20
+ DAY = 1340
21
+ #
22
+ # @return [Float] 変日(1近点月 = 27日743分1秒(1分=12秒))
23
+ # @note 小数点以下の値によって大幅に結果が変わる。除算結果を設定した
24
+ #
25
+ # ANOMALISTIC_MONTH = 36_923.083333333333
26
+ ANOMALISTIC_MONTH = 36_923 + (1.0 / 12)
27
+ # @return [Integer] 朔望月
28
+ SYNODIC_MONTH = 39_571
29
+ # @return [Integer] 一年
30
+ YEAR = 489_428
31
+ end
32
+
33
+ #
34
+ # Derivation 導出
35
+ #
36
+ module Derivation
37
+ # @return [Integer] 通余: (YEAR - DAY * 12 * 30)
38
+ REMAINDER_ALL_YEAR = 7028
39
+ # @return [Integer] 旬周(60日) DAY * 60
40
+ SIXTY_DAYS = 80_400
41
+ end
42
+
43
+ #
44
+ # 累積
45
+ #
46
+ module Stack
47
+ # @return [Integer] 積年(甲子夜半朔旦冬至〜暦の開始前)
48
+ TOTAL_YEAR = 269_880
49
+ # @return [Integer] 暦の開始年(麟徳元年)
50
+ BEGIN_YEAR = 664
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../cycle/remainder'
4
+
5
+ # :nodoc:
6
+ module Zakuro
7
+ # :nodoc:
8
+ module Gihou
9
+ #
10
+ # Const 定数
11
+ #
12
+ module Const
13
+ #
14
+ # Remainder 大余小余
15
+ #
16
+ module Remainder
17
+ #
18
+ # Solar 太陽
19
+ #
20
+ module Solar
21
+ # @return [Remainder] 気策(24分の1年)
22
+ SOLAR_TERM_AVERAGE = Cycle::Remainder.new(day: 15, minute: 292, second: 5)
23
+ #
24
+ # @note 常朔実 39571 = 29-711
25
+ # * 39571 / 4 = 9892.75 / 1340 = 7 余り 512.75
26
+ # * 0.75 * 6(1分=6秒) = 4.5
27
+ #
28
+ # @return [Cycle::Remainder] 弦(1分=6秒)
29
+ QUARTER = Cycle::Remainder.new(day: 7, minute: 512, second: 4.5)
30
+ end
31
+
32
+ #
33
+ # Lunar 月
34
+ #
35
+ module Lunar
36
+ # @return [Cycle::LunarRemainder] 変日(1近点月)
37
+ ANOMALISTIC_MONTH = \
38
+ Cycle::LunarRemainder.new(day: 27, minute: 743, second: 1)
39
+ #
40
+ # @note 常朔実 39571 = 29-711
41
+ # * 39571 / 4 = 9892.75 / 1340 = 7 余り 512.75
42
+ # * 0.75 * 12(1分=12秒) = 9
43
+ #
44
+ # @return [Cycle::LunarRemainder] 弦(1分=12秒)
45
+ # TODO: 9秒だと通らない。 0.00378 〜 0.0208 の範囲内で通る
46
+ # QUARTER = Cycle::LunarRemainder.new(day: 7, minute: 512, second: 9)
47
+ # QUARTER = Cycle::LunarRemainder.new(day: 7, minute: 512, second: 9.00378)
48
+ # QUARTER = Cycle::LunarRemainder.new(day: 7, minute: 512, second: 9.0208)
49
+ QUARTER = Cycle::LunarRemainder.new(day: 7, minute: 512, second: 9.00378)
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../calculation/cycle/abstract_remainder'
4
+
5
+ require_relative '../const/number'
6
+
7
+ # :nodoc:
8
+ module Zakuro
9
+ # :nodoc:
10
+ module Gihou
11
+ # :nodoc:
12
+ module Cycle
13
+ #
14
+ # Remainder 時刻情報(大余小余)
15
+ #
16
+ class Remainder < Calculation::Cycle::AbstractRemainder
17
+ # @return [Integer] 分(1分=6秒)
18
+ MINUTE = 6
19
+
20
+ #
21
+ # 初期化
22
+ #
23
+ # @param [Integer] day 大余("日"に相当)
24
+ # @param [Integer] minute 小余("分"に相当)
25
+ # @param [Integer] second 秒
26
+ # @param [Integer] total 繰り上げなしの小余
27
+ #
28
+ def initialize(day: -1, minute: -1, second: -1, total: -1)
29
+ super(base_day: Const::Number::Cycle::DAY, base_mitune: MINUTE,
30
+ day: day, minute: minute, second: second, total: total)
31
+ end
32
+ end
33
+
34
+ #
35
+ # LunarRemainder 月の位相計算向け時刻情報(大余小余)
36
+ #
37
+ class LunarRemainder < Calculation::Cycle::AbstractRemainder
38
+ # @return [Integer] 分(1分=12秒)
39
+ MINUTE = 12
40
+
41
+ #
42
+ # 初期化
43
+ #
44
+ # @param [Integer] day 大余("日"に相当)
45
+ # @param [Integer] minute 小余("分"に相当)
46
+ # @param [Integer] second 秒
47
+ # @param [Integer] total 繰り上げなしの小余
48
+ #
49
+ def initialize(day: -1, minute: -1, second: -1, total: -1)
50
+ super(base_day: Const::Number::Cycle::DAY, base_mitune: MINUTE,
51
+ day: day, minute: minute, second: second, total: total)
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end