Class: When::CalendarTypes::CalendarNote::JapaneseNote
- Inherits:
-
When::CalendarTypes::CalendarNote
- Object
- BasicTypes::Object
- TM::Object
- TM::ReferenceSystem
- When::CalendarTypes::CalendarNote
- When::CalendarTypes::CalendarNote::JapaneseNote
- Defined in:
- lib/when_exe/region/japanese_notes.rb
Overview
日本暦注
Defined Under Namespace
Constant Summary collapse
- NoteTypes =
[ # 開始年 暦法 土用のオフセット [-660, '儀鳳暦' ], [ 454, '元嘉暦' ], [ 697, '麟徳暦', (Rational( 4,15) + 244) / 1340 ], # 啓蟄 <-> 雨水 [ 764, '大衍暦', (Rational(13,30) + 531) / 3040 ], [ 858, '五紀暦', (Rational( 4,15) + 244) / 1340 ], [ 862, '宣明暦', (Rational( 1, 2) + 1468) / 8400 ], [1685, ['timezone=32584.4/3600', '前貞享暦(節月)' ]], [1687, ['timezone=32584.4/3600', '貞享暦(節月)' ]], [1753, ['timezone=32584.4/3600', '前々宝暦暦(節月)']], [1754, ['timezone=32584.4/3600', '前宝暦暦(節月)' ]], [1755, ['timezone=32584.4/3600', '宝暦暦(節月)' ]], [1771, ['timezone=32584.4/3600', '修正宝暦暦(節月)']], [1798, ['timezone=32584.4/3600', '寛政暦(節月)' ]], [1844, 'timezone=32584.4/3600'], # 京都平均太陽時の定朔定気法太陰太陽暦(天保暦の代用) [1873, 'timezone=33539/3600' ], # 東京平均太陽時の定朔定気法太陰太陽暦 [1888, 'timezone=9'] # 日本標準時の定朔定気法太陰太陽暦 ].reverse
- NoteObjects =
[When::BasicTypes::M17n, [ "namespace:[en=http://en.wikipedia.org/wiki/, ja=http://ja.wikipedia.org/wiki/]", "locale:[=ja:]", "names:[日本暦注]", # 年の暦注 ---------------------------- [When::BasicTypes::M17n, "names:[年]", [Notes, "label:[干支]", 'position:共通'], # 干支 # [Notes, "label:[干=ja:%E5%8D%81%E5%B9%B2]", # 'position:共通'], # 干 # [Notes, "label:[支=ja:%E5%8D%81%E4%BA%8C%E6%94%AF]", # 'position:共通'], # 支 [Notes, "label:[九星]", 'position:民間'], # 九星 [Notes, "label:[大歳壇=]", 'position:暦序'], # 干支 [Notes, "label:[納音]", 'position:暦序', 'suffix:是'], # 干支 [Notes, "label:[大歳=ja:%E5%A4%AA%E6%AD%B3%E7%A5%9E]", 'position:暦序', 'suffix:在'], # 干支 [Notes, "label:[大将軍=ja:%E5%A4%A7%E5%B0%86%E8%BB%8D_(%E6%96%B9%E4%BD%8D%E7%A5%9E)]", 'position:暦序', 'suffix:在'], # 支 [Notes, "label:[大陰=ja:%E5%A4%A7%E9%99%B0]", 'position:暦序', 'suffix:在'], # 支 [Notes, "label:[歳徳=ja:%E6%AD%B3%E5%BE%B3%E7%A5%9E]", 'position:暦序', 'suffix:在'], # 干 [Notes, "label:[歳刑=ja:%E6%AD%B3%E5%88%91%E7%A5%9E]", 'position:暦序', 'suffix:在'], # 支 [Notes, "label:[歳破=ja:%E6%AD%B3%E7%A0%B4%E7%A5%9E]", 'position:暦序', 'suffix:在'], # 支 [Notes, "label:[歳煞=ja:%E6%AD%B3%E6%AE%BA%E7%A5%9E]", 'position:暦序', 'suffix:在'], # 支 [Notes, "label:[黄幡=ja:%E9%BB%84%E5%B9%A1%E7%A5%9E]", 'position:暦序', 'suffix:在'], # 支 [Notes, "label:[豹尾=ja:%E8%B1%B9%E5%B0%BE%E7%A5%9E]", 'position:暦序', 'suffix:在'], # 支 [Notes, "label:[歳次=]", 'position:暦序', 'suffix:-'], # 支 [Notes, "label:[金神]", 'position:仮名暦', 'suffix:在'] # 干 ], # 月の暦注 ---------------------------- [When::BasicTypes::M17n, "names:[月]", [Notes, "label:[月名=ja:%E6%9C%88_(%E6%9A%A6)#.E6.97.A5.E6.9C.AC.E3.81.AE.E5.92.8C.E9.A2.A8.E6.9C.88.E5.90.8D]", 'position:月建'], # 月の和名 # [Notes, "label:[干支]", 'position:共通'], # 干支 # [Notes, "label:[干=ja:%E5%8D%81%E5%B9%B2]", # 'position:共通'], # 干 # [Notes, "label:[支=ja:%E5%8D%81%E4%BA%8C%E6%94%AF]", # 'position:共通'], # 支 [Notes, "label:[九星]", 'position:民間'], # 九星 [Notes, "label:[月建=]", 'position:月建', 'suffix:-'], # 干支 [Notes, "label:[天道=]", 'position:月建', 'suffix:-'], # 干 [Notes, "label:[天徳=]", 'position:月建', 'suffix:在'], # 干 [Notes, "label:[月煞=]", 'position:月建', 'suffix:在'], # 干 [Notes, "label:[用時=]", 'position:月建'], # 干 [Notes, "label:[月徳=]", 'position:月建', 'suffix:在'], # 干 [Notes, "label:[月徳合=]", 'position:月建', 'suffix:在'], # 干 [Notes, "label:[月空=]", 'position:月建', 'suffix:在'], # 干 [Notes, "label:[三鏡=]", 'position:月建'], # 干 [Notes, "label:[土府=]", 'position:月建', 'suffix:在'], # 干 [Notes, "label:[土公=ja:%E5%9C%9F%E5%85%AC%E7%A5%9E]", 'position:月建', 'suffix:在'] # 干 ], # 日の暦注 ---------------------------- [When::BasicTypes::M17n, "names:[日]", [Notes, "label:[干支]", 'position:共通'], # 干支 # [Notes, "label:[干=ja:%E5%8D%81%E5%B9%B2]", # 'position:共通'], # 干 # [Notes, "label:[支=ja:%E5%8D%81%E4%BA%8C%E6%94%AF]", # 'position:共通'], # 支 [Notes, "label:[納音]", 'position:共通', 'suffix:是'], # 干支 [Notes, "label:[十二直]", 'position:共通'], # 支 節月 [Notes, "label:[七曜]", 'position:共通'], # 七曜 [Notes, "label:[廿八宿=ja:%E4%BA%8C%E5%8D%81%E5%85%AB%E5%AE%BF]", 'position:共通'], # 廿八宿 [Notes, "label:[廿七宿=ja:%E4%BA%8C%E5%8D%81%E4%B8%83%E5%AE%BF]", 'position:共通'], # 暦月 暦日 [Notes, "label:[九星]", 'position:民間'], # 九星 [Notes, "label:[六曜]", 'position:民間'], # 暦月 暦日 [Notes, "label:[祝祭日]", 'position:祝祭日'], # 暦月 暦日 (七曜) [Notes, "label:[節中=]", 'position:時候'], # 太陽黄経 [Notes, "label:[廿四節気=ja:%E4%BA%8C%E5%8D%81%E5%9B%9B%E7%AF%80%E6%B0%97]", 'position:時候'], # 太陽黄経 [Notes, "label:[七十二候]", 'position:時候'], # 太陽黄経 [Notes, "label:[六十卦=]", 'position:時候'], # 太陽黄経 [Notes, "label:[入梅]", 'position:雑節'], # 干 太陽黄経 [Notes, "label:[大禍=ja:%E5%A4%A7%E7%A6%8D%E6%97%A5#.E5.A4.A7.E7.A6.8D.E6.97.A5]", 'position:上段 上段 欄外 欄外', 'suffix:日'], # 支 節月 [Notes, "label:[滅門=ja:%E6%BB%85%E9%96%80%E6%97%A5#.E6.BB.85.E9.96.80.E6.97.A5]", 'position:上段 上段 欄外 欄外', 'suffix:日'], # 支 節月 [Notes, "label:[狼藉=ja:%E6%9A%A6%E6%B3%A8%E4%B8%8B%E6%AE%B5#.E7.8B.BC.E8.97.89.E6.97.A5]", 'position:上段 上段 欄外 欄外', 'suffix:日'], # 支 節月 [Notes, "label:[甘露=]", 'position:上段 上段 上段 上段', 'suffix:日'], # 七曜 廿七宿 [Notes, "label:[金剛峯=]", 'position:上段 上段 上段 上段'], # 七曜 廿七宿 [Notes, "label:[羅刹=]", 'position:中段 中段 上段 上段'], # 七曜 廿七宿 [Notes, "label:[大将軍=ja:%E5%A4%A7%E5%B0%86%E8%BB%8D_(%E6%96%B9%E4%BD%8D%E7%A5%9E)]", 'position:上段 上段 上段 上段', 'suffix:-'], # 干支 節年 [Notes, "label:[天一=ja:%E5%A4%A9%E4%B8%80%E7%A5%9E]", 'position:上段 上段 上段 上段', 'suffix:-'], # 干支 [Notes, "label:[土公=ja:%E5%9C%9F%E5%85%AC%E7%A5%9E]", 'position:上段 上段 上段 上段'], # 干支 [Notes, "label:[歳下食=ja:%E6%AD%B3%E4%B8%8B%E9%A3%9F#.E6.AD.B3.E4.B8.8B.E9.A3.9F]", 'position:上段 上段 上段 上段'], # 干支 節年 [Notes, "label:[忌遠行=]", 'position:上段 中段 上段 上段'], # 支 節月 [Notes, "label:[忌夜行=]", 'position:上段 中段 上段 上段'], # 支 節月 [Notes, "label:[下食時=ja:%E4%B8%8B%E9%A3%9F%E6%99%82#.E6.99.82.E4.B8.8B.E9.A3.9F]", 'position:上段 上段 上段 上段'], # 支 節月 貞享暦で一部廃止 [Notes, "label:[天間=]", 'position:上段 中段 上段 中段上'], # 干支 節月 [Notes, "label:[不視病=]", 'position:上段 上段 上段 上段'], # 干 [Notes, "label:[不問疾=]", 'position:上段 上段 上段 上段'], # 干 [Notes, "label:[不弔人=]", 'position:上段 上段 上段 上段'], # 支 [Notes, "label:[社=ja:%E7%A4%BE%E6%97%A5]", 'position:中段 中段 中段 中段', 'suffix:日'], # 干 太陽黄経 [Notes, "label:[三伏]", 'position:中段 中段 中段 中段'], # 干 太陽黄経 [Notes, "label:[除手足甲=]", 'position:中段 中段 中段 中段'], # 晦(除手足甲)、支(片方のみ), 没滅凶会日× [Notes, "label:[沐浴=]", 'position:中段 中段 中段 中段'], # 支 没滅凶会日× [Notes, "label:[臘=ja:%E8%87%98%E6%97%A5]", 'position:中段 中段 中段 中段', 'suffix:日'], # 支 太陽黄経 [Notes, "label:[伐=]", 'position:上段 中段 中段 中段上', 'suffix:日'], # 干支 [Notes, "label:[五墓=ja:%E4%BA%94%E5%A2%93%E6%97%A5#.E4.BA.94.E5.A2.93.E6.97.A5]", 'position:上段 上段 中段 中段下', 'suffix:日'], # 干支 [Notes, "label:[九虎=]", 'position:上段 中段 中段 中段上'], # 干支 節月 [Notes, "label:[八龍=]", 'position:上段 上段 中段 中段上'], # 干支 節月 [Notes, "label:[七鳥=]", 'position:上段 上段 中段 中段上'], # 干支 節月 [Notes, "label:[六蛇=]", 'position:上段 上段 中段 中段上'], # 干支 節月 [Notes, "label:[没=ja:%E6%B2%A1%E6%97%A5]", 'position:中段 中段 中段 中段', 'suffix:日'], # 太陽黄経 [Notes, "label:[日食]", 'position:中段 中段 中段 中段'], # 日食表 [Notes, "label:[滅=ja:%E6%BB%85%E6%97%A5]", 'position:中段 中段 中段 中段', 'suffix:日'], # 月の位相 [Notes, "label:[月食]", 'position:中段 中段 中段 中段'], # 月食表 [Notes, "label:[月相]", 'position:中段 中段 中段 中段'], # 月の位相 [Notes, "label:[土用事=ja:%E5%9C%9F%E7%94%A8]", 'position:中段 中段 中段 中段'], # 太陽黄経 [Notes, "label:[伏龍=]", 'position:上段 上段 下段 下段', 'suffix:在'], # 太陽黄経 [Notes, "label:[凶会=ja:%E5%87%B6%E4%BC%9A%E6%97%A5#.E5.87.B6.E4.BC.9A.E6.97.A5]", 'position:下段 下段 下段 下段', 'suffix:日'], # 干支 節月(宣明暦以前)/暦月(貞享暦以降) [Notes, "label:[大小歳=]", 'position:下段 下段 下段 下段'], # 干支 節月 [Notes, "label:[歳徳=ja:%E6%AD%B3%E5%BE%B3%E7%A5%9E]", 'position:下段 下段 下段 下段',], # 干 節年 凶会日× ~合も [Notes, "label:[天恩=ja:%E5%A4%A9%E6%81%A9%E6%97%A5#.E5.A4.A9.E6.81.A9.E6.97.A5]", 'position:下段 下段 下段 下段', 'suffix:日'], # 干支 節月 凶会日× [Notes, "label:[天赦=ja:%E6%9A%A6%E6%B3%A8%E4%B8%8B%E6%AE%B5#.E5.A4.A9.E8.B5.A6.E6.97.A5]", 'position:下段 下段 下段 下段'], # 干支 節月 [Notes, "label:[母倉=ja:%E6%AF%8D%E5%80%89%E6%97%A5#.E6.AF.8D.E5.80.89.E6.97.A5]", 'position:下段 下段 下段 下段', 'suffix:日'], # 支 節月 凶会日× [Notes, "label:[月徳=]", 'position:下段 下段 下段 下段',], # 干 節月 凶会日× ~合も [Notes, "label:[九坎=]", 'position:下段 下段 下段 下段'], # 支 節月 [Notes, "label:[帰忌=ja:%E5%B8%B0%E5%BF%8C%E6%97%A5#.E5.B8.B0.E5.BF.8C.E6.97.A5]", 'position:下段 下段 下段 下段', 'suffix:日'], # 支 節月 [Notes, "label:[血忌=ja:%E8%A1%80%E5%BF%8C%E6%97%A5#.E8.A1.80.E5.BF.8C.E6.97.A5]", 'position:下段 下段 下段 下段', 'suffix:日'], # 支 節月 [Notes, "label:[無翹=]", 'position:下段 下段 下段 下段'], # 支 節月 [Notes, "label:[厭=]", 'position:下段 下段 下段 下段'], # 支 節月 [Notes, "label:[重=ja:%E9%87%8D%E6%97%A5#.E9.87.8D.E6.97.A5]", 'position:下段 下段 下段 下段', 'suffix:日'], # 支 [Notes, "label:[復=ja:%E5%BE%A9%E6%97%A5#.E5.BE.A9.E6.97.A5]", 'position:下段 下段 下段 下段', 'suffix:日'], # 干 節月 [Notes, "label:[月煞=]", 'position:下段 下段 下段 下段', 'suffix:在'], # 支 節月 [Notes, "label:[往亡=ja:%E5%BE%80%E4%BA%A1%E6%97%A5#.E5.BE.80.E4.BA.A1.E6.97.A5]", 'position:下段 下段 下段 下段', 'suffix:日'], # 太陽黄経 [Notes, "label:[日遊=ja:%E6%97%A5%E9%81%8A%E7%A5%9E]", 'position:最下段', 'suffix:在'], # 干支 [Notes, "label:[受死=ja:%E5%8F%97%E6%AD%BB%E6%97%A5#.E5.8F.97.E6.AD.BB.E6.97.A5]", 'position:仮名暦', 'suffix:日'], # 支 節月 [Notes, "label:[彼岸]", 'position:仮名暦'], # 太陽黄経 [Notes, "label:[八専]", 'position:仮名暦'], # 干支 [Notes, "label:[金神間日=ja:%E9%87%91%E7%A5%9E#.E9.87.91.E7.A5.9E.E3.81.AE.E9.81.8A.E8.A1.8C.E3.83.BB.E9.96.93.E6.97.A5]", 'position:仮名暦'], # 支 節月 [Notes, "label:[天火=ja:%E5%A4%A9%E7%81%AB%E6%97%A5#.E5.A4.A9.E7.81.AB.E6.97.A5]", 'position:仮名暦', 'suffix:日'], # 支 節月 [Notes, "label:[地火=ja:%E5%9C%B0%E7%81%AB%E6%97%A5#.E5.9C.B0.E7.81.AB.E6.97.A5]", 'position:仮名暦', 'suffix:日'], # 支 節月 [Notes, "label:[人火=]", 'position:仮名暦'], # 支 節月 [Notes, "label:[雷火=]", 'position:仮名暦'], # 支 節月 [Notes, "label:[赤舌=ja:%E8%B5%A4%E8%88%8C%E6%97%A5]", 'position:仮名暦', 'suffix:日'], # 暦月 暦日 [Notes, "label:[十死=ja:%E5%8D%81%E6%AD%BB%E6%97%A5#.E5.8D.81.E6.AD.BB.E6.97.A5]", 'position:仮名暦', 'suffix:日'], # 支 節月 [Notes, "label:[道虚=]", 'position:仮名暦', 'suffix:日'], # 暦日 [Notes, "label:[大明=ja:%E5%A4%A7%E6%98%8E%E6%97%A5#.E5.A4.A7.E6.98.8E.E6.97.A5]", 'position:仮名暦', 'suffix:日'], # 干支 [Notes, "label:[赤口=ja:%E8%B5%A4%E5%8F%A3%E6%97%A5]", 'position:仮名暦', 'suffix:日'], # 暦月 暦日 [Notes, "label:[甲子待=ja:%E7%94%B2%E5%AD%90]", 'position:仮名暦'], # 干支 [Notes, "label:[庚申待]", 'position:仮名暦'], # 干支 [Notes, "label:[犯土]", 'position:仮名暦'], # 干支 [Notes, "label:[十方暮]", 'position:仮名暦'], # 干支 [Notes, "label:[一粒万倍=ja:%E4%B8%80%E7%B2%92%E4%B8%87%E5%80%8D%E6%97%A5]", 'position:仮名暦', 'suffix:日'], # 支 節月 [Notes, "label:[天福=]", 'position:仮名暦'], # 支 節月 [Notes, "label:[地福=]", 'position:仮名暦'], # 支 節月 [Notes, "label:[地五福=]", 'position:仮名暦'], # 支 節月 [Notes, "label:[三隣亡]", 'position:仮名暦'], # 支 節月 [Notes, "label:[不成就=ja:%E4%B8%8D%E6%88%90%E5%B0%B1%E6%97%A5]", 'position:仮名暦', 'suffix:日'], # 暦月 暦日/晦日 [Notes, "label:[三宝吉=]", 'position:上段 上段 上段 上段'], # 干支 節月(宣明暦以前)/暦月(貞享暦以降) [Notes, "label:[神吉=ja:%E7%A5%9E%E5%90%89%E6%97%A5#.E7.A5.9E.E5.90.89.E6.97.A5]", 'position:上段 上段 中段 中段上', 'suffix:日'], # 干支 節月 [Notes, "label:[雑事吉=]", 'position:雑事吉'], # 干支 節月(宣明暦以前)/暦月(貞享暦以降) [Notes, "label:[小字注=]", 'position:下段小字 下段小字 下段小字 下段小字'], # 干支 節月(宣明暦以前)/暦月(貞享暦以降) ] ]]
- NoteMethods =
[:year_notes, :month_notes, :day_notes]
Constants inherited from When::CalendarTypes::CalendarNote
BahaiNotes, ChineseNotes, DefaultNotes, JavaneseNotes, JulianDayNotes, MayanNotes, YiNotes
Constants included from Parts::Resource
Parts::Resource::LabelProperty, Parts::Resource::Prefix, Parts::Resource::PrefixIndex, Parts::Resource::PrefixKeys, Parts::Resource::PrefixValues
Instance Attribute Summary
Attributes inherited from When::CalendarTypes::CalendarNote
Attributes inherited from TM::ReferenceSystem
#domain, #domain_of_validity, #position
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Instance Method Summary collapse
Methods inherited from When::CalendarTypes::CalendarNote
#copy, #day, #duration, #enum_for, #include?, #month, #note?, #year
Methods inherited from TM::ReferenceSystem
Methods inherited from BasicTypes::Object
Methods included from Parts::Resource
#[], #^, _extract_prefix, _instance, _parse, _path_with_prefix, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #next, #parent, #prev, #registered?
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
#notes(date, options = {}) ⇒ Hash, ...
return 値の [Hash] の要素は下記の通り :note => 暦注要素 (When::CalendarTypes::JapaneseNote::Notes) :value => 暦注の値 (String or When::BasicTypes::M17n または、その Array) :position => 具注暦でのその暦注の配置場所(String)
暦注の計算
358 359 360 361 362 363 364 |
# File 'lib/when_exe/region/japanese_notes.rb', line 358 def notes(date, ={}) dates, indices, notes, conditions, = _parse(date, ) _result(indices.map {|i| next [] unless i <= dates.o_date.precision send(NoteMethods[i-1], dates, notes[i-1], conditions) }, ) end |