月日の配当が太陽および月の位置によって決定される暦
Calendar based on the ephemeris of the Sun or the Moon
年月日 -> 通日
y - 年 m - 月 (0 始まり) d - 日 (0 始まり) returns : 通日
# File when/calendartypes.rb, line 672
672: def _coordinates_to_number(yy, mm=0, dd=0)
673: _new_month(_new_year_month(+yy) + mm) + dd
674: end
通日 - > 年月日
sdn : 通日
returns : [y, m, d]
y - 年
m - 月 (0 始まり)
d - 日 (0 始まり)
# File when/calendartypes.rb, line 685
685: def _number_to_coordinates(sdn)
686: nn, dd = Residue.mod(sdn) {|m| _new_month(m)}
687: yy, mm = Residue.mod(nn) {|y| _new_year_month(y)}
688: [yy, mm, dd]
689: end
暦要素数
引数パターン1
date : [y]
y - 年
returns : その年の月数
引数パターン2
date : [y, m]
y - 年
m - 月 (0 始まり)
returns : その年月の日数
# File when/calendartypes.rb, line 706
706: def _length(date)
707: y, m = date
708: if (m)
709: # 指定した月に含まれる日の数を返します。
710: m += _new_year_month(+y)
711: return _new_month(m+1) - _new_month(m)
712: else
713: # 指定した年に含まれる月の数を返します。
714: return _ids([y]).length
715: end
716: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.