Class: When::CalendarTypes::CalendarNote::JapaneseNote

Inherits:
When::CalendarTypes::CalendarNote show all
Defined in:
lib/when_exe/region/japanese_notes.rb

Overview

日本暦注

Defined Under Namespace

Classes: Cal4Note, Dates, LunarPhases, Note, SolarTerms

Constant Summary collapse

NoteObjects =

日本暦注の要素

[When::BasicTypes::M17n, [
  "namespace:[en=http://en.wikipedia.org/wiki/, ja=http://ja.wikipedia.org/wiki/]",
  "locale:[=ja:]",
  "names:[日本暦注]",

  # 年の暦注 ----------------------------
  [When::BasicTypes::M17n,
    "names:[年]",
    [Note, 0xFFFF, "label:[干支]",       'position:共通'],                               #  0: 干支
  # [Note, 0xFFFF, "label:[干=ja:%%<十干>]",
  #                                   'position:共通'],                                  #     干
  # [Note, 0xFFFF, "label:[支=ja:%%<十二支>]",
  #                                   'position:共通'],                                  #     支
    [Note, 0x3800, "label:[廿八宿=ja:%%<二十八宿>]",
                                         'position:共通'],                               #  1: 廿八宿
    [Note, 0x3FFC, "label:[大歳壇=]",    'position:暦序'],                               #  2: 干支
    [Note, 0xC000, "label:[九星]",       'position:民間'],                               #  3: 九星
    [Note, 0xFFFC, "label:[納音]",       'position:暦序',   'suffix:是'],                #  4: 干支
    [Note, 0xFFFF, "label:[大歳=ja:%%<太歳神>]",
                                         'position:暦序',   'suffix:在'],                #  5: 干支
    [Note, 0xFFFF, "label:[大將軍=ja:%%<大将軍_(方位神)>]",
                                         'position:暦序',   'suffix:在'],                #  6: 支
    [Note, 0xFFFF, "label:[大陰=ja:%%<太陰神>]",
                                         'position:暦序',   'suffix:在'],                #  7: 支
    [Note, 0xFFFF, "label:[歳徳=ja:%%<歳徳神>]",
                                         'position:暦序',   'suffix:在'],                #  8: 干
    [Note, 0xFFFF, "label:[歳刑=ja:%%<歳刑神>]",
                                         'position:暦序',   'suffix:在'],                #  9: 支
    [Note, 0xFFFF, "label:[歳破=ja:%%<歳破神>]",
                                         'position:暦序',   'suffix:在'],                # 10: 支
    [Note, 0xFFFF, "label:[歳煞=ja:%%<歳煞神>]",
                                         'position:暦序',   'suffix:在'],                # 11: 支
    [Note, 0xFFFF, "label:[黄幡=ja:%%<黄幡神>]",
                                         'position:暦序',   'suffix:在'],                # 12: 支
    [Note, 0xFFFF, "label:[豹尾=ja:%%<豹尾神>]",
                                         'position:暦序',   'suffix:在'],                # 13: 支
    [Note, 0x0003, "label:[天道=]",      'position:暦序',   'suffix:-'],                 # 14: 支
    [Note, 0x0003, "label:[人道=]",      'position:暦序',   'suffix:-'],                 # 15: 支
    [Note, 0x3FFC, "label:[歳次=]",      'position:暦序',   'suffix:-'],                 # 16: 支
    [Note, 0xF800, "label:[金神]",       'position:仮名暦', 'suffix:在'],                # 17: 干
    [Note, 0xFFFF, "label:[大小]",       'position:暦序']                                # 18: 朔閏表
  ],

  # 月の暦注 ----------------------------
  [When::BasicTypes::M17n,
    "names:[月]",
    [Note, 0xFFFF, "label:[月名=ja:%%<月_(暦)>#%.<日本の和風月名>]",
                                         'position:月建'],                               #  0: 月の和名
  # [Note, 0xFFFF, "label:[干支]",       'position:共通'],                               #     干支
  # [Note, 0xFFFF, "label:[干=ja:%%<十干>]",
  #                                           'position:共通'],                          #     干
  # [Note, 0xFFFF, "label:[支=ja:%%<十二支>]",
  #                                           'position:共通'],                          #     支
    [Note, 0xF800, "label:[廿八宿=ja:%%<二十八宿>]",
                                         'position:共通'],                               #  1: 廿八宿
    [Note, 0xFFFC, "label:[月建=]",      'position:月建',   'suffix:-' ],                #  2: 年の十干と暦月
    [Note, 0xC000, "label:[九星]",       'position:民間'],                               #  3: 九星
    [Note, 0x0003, "label:[天氣=]",      'position:月建',   'suffix:-' ],                #  4: 暦月
    [Note, 0x3FFF, "label:[天道=]",      'position:月建',   'suffix:-' ],                #  5: 暦月
    [Note, 0x0003, "label:[人道=]",      'position:月建',   'suffix:-' ],                #  6: 暦月
    [Note, 0x0003, "label:[月破=]",      'position:月建',   'suffix:在'],                #  7: 暦月
    [Note, 0x3FFC, "label:[天徳=]",      'position:月建',   'suffix:在'],                #  8: 暦月
    [Note, 0x3FFF, "label:[月煞=]",      'position:月建',   'suffix:在'],                #  9: 暦月
    [Note, 0x3FFF, "label:[用時=]",      'position:月建',   'suffix:-' ],                # 10: 暦月
    [Note, 0x3FFF, "label:[月徳=]",      'position:月建',   'suffix:在'],                # 11: 暦月
    [Note, 0x3FFC, "label:[月徳合=]",    'position:月建',   'suffix:在'],                # 12: 暦月
    [Note, 0x3FFC, "label:[月空=]",      'position:月建',   'suffix:在'],                # 13: 暦月
    [Note, 0x3FFF, "label:[三鏡=]",      'position:月建',   'suffix:-' ],                # 14: 暦月
    [Note, 0x3FFF, "label:[土府=]",      'position:月建',   'suffix:在'],                # 15: 暦月
    [Note, 0x3FFC, "label:[土公=ja:%%<土公神>]",
                                         'position:月建',   'suffix:在'],                # 16: 暦月
    [Note, 0xFFFF, "label:[大小]",       'position:月建']                                # 17: 朔閏表
  ],

  # 日の暦注 ----------------------------
  [When::BasicTypes::M17n,
    "names:[日]",
    [Note, 0xFFFF, "label:[干支]",       'position:共通'],                               #  0: 干支
  # [Note, 0x, "label:[干=ja:%%<十干>]",
  #                                           'position:共通'],                          #     干
  # [Note, 0x, "label:[支=ja:%%<十二支>]",
  #                                           'position:共通'],                          #     支
    [Note, 0x3FFF, "label:[納音]",       'position:共通',   'suffix:是'],                #  1: 干支
    [Note, 0xFFFF, "label:[十二直]",     'position:共通'],                               #  2: 支 節月
    [Note, 0xFFFF, "label:[七曜]",       'position:共通'],                               #  3: 七曜
    [Note, 0xF800, "label:[廿八宿=ja:%%<二十八宿>]",
                                         'position:共通'],                               #  4: 廿八宿
    [Note, 0x07F8, "label:[廿七宿=ja:%%<二十八宿>]",
                                         'position:共通'],                               #  5: 暦月 暦日
    [Note, 0xC000, "label:[九星]",       'position:民間'],                               #  6: 九星
    [Note, 0x8000, "label:[六曜]",       'position:民間'],                               #  7: 暦月 暦日
    [Note, 0xE000, "label:[祝祭日]",     'position:祝祭日'],                             #  8: 暦月 暦日 (七曜)
    [Note, 0xFFFF, "label:[廿四節気=ja:%%<二十四節気>]",
                                         'position:時候'],                               #  9: 太陽黄経
    [Note, 0xFFFF, "label:[節中=]",      'position:時候'],                               # 10: 太陽黄経
    [Note, 0xFFFC, "label:[七十二候]",   'position:時候'],                               # 11: 太陽黄経
    [Note, 0x3FFC, "label:[六十卦=]",    'position:時候'],                               # 12: 太陽黄経
    [Note, 0xF800, "label:[節分]",       'position:雑節'],                               # 13: 立春からの日数
    [Note, 0xF800, "label:[初午]",       'position:雑節'],                               # 14: 支 節月 or 暦月
    [Note, 0xF800, "label:[八十八夜]",   'position:雑節'],                               # 15: 立春からの日数
    [Note, 0xF800, "label:[入梅]",       'position:雑節'],                               # 16: 干 太陽黄経
    [Note, 0xF800, "label:[二百十日]",   'position:雑節'],                               # 17: 立春からの日数
    [Note, 0xF800, "label:[二百廿日]",   'position:雑節'],                               # 18: 立春からの日数

    [Note, 0x3FFC, "label:[大禍=ja:%%<暦注下段>#%.<大禍日>]",
                                         'position:上段 上段 欄外 欄外', 'suffix:日'],   # 19: 支 節月
    [Note, 0x3FFC, "label:[滅門=ja:%%<暦注下段>#%.<滅門日>]",
                                         'position:上段 上段 欄外 欄外', 'suffix:日'],   # 20: 支 節月
    [Note, 0x3FFC, "label:[狼藉=ja:%%<暦注下段>#%.<狼藉日>]",
                                         'position:上段 上段 欄外 欄外', 'suffix:日'],   # 21: 支 節月

    [Note, 0x07F8, "label:[甘露=]",      'position:上段 上段 上段 上段', 'suffix:日'],   # 22: 七曜 廿七宿
    [Note, 0x07F8, "label:[金剛峯=]",    'position:上段 上段 上段 上段'],                # 23: 七曜 廿七宿
    [Note, 0x07F8, "label:[羅刹=]",      'position:中段 中段 上段 上段'],                # 24: 七曜 廿七宿

    [Note, 0x3FFC, "label:[大將軍=ja:%%<大将軍_(方位神)>]",
                                         'position:上段 上段 上段 上段',   'suffix:-'],  # 25: 干支 節年
    [Note, 0xFFFC, "label:[天一=ja:%%<天一神>]",
                                         'position:上段 上段 上段 上段',   'suffix:-'],  # 26: 干支
    [Note, 0x3FFC, "label:[土公=ja:%%<土公神>]",
                                         'position:上段 上段 上段 上段',   'suffix:-'],  # 27: 干支
    [Note, 0x3FFC, "label:[歳下食=ja:%%<暦注下段>#%.<歳下食>]",
                                         'position:上段 上段 上段 上段'],                # 28: 干支 節年
    [Note, 0x3FFC, "label:[忌遠行=]",    'position:上段 中段 上段 上段'],                # 29: 支 節月
    [Note, 0x3FFC, "label:[忌夜行=]",    'position:上段 中段 上段 上段'],                # 30: 支 節月
    [Note, 0x3FFC, "label:[下食時=ja:%%<暦注下段>#%.<時下食>]",
                                         'position:上段 上段 上段 上段',   'suffix:-'],  # 31: 支 節月 貞享暦で一部廃止
    [Note, 0x3FFC, "label:[天間=]",      'position:上段 中段 上段 中段上'],              # 32: 干支 節月
    [Note, 0x3FFC, "label:[不視病=]",    'position:上段 上段 上段 上段'],                # 33: 干
    [Note, 0x3FFC, "label:[不問疾=]",    'position:上段 上段 上段 上段'],                # 34: 干
    [Note, 0x3FFC, "label:[不弔人=]",    'position:上段 上段 上段 上段'],                # 35: 支
    [Note, 0xFFFC, "label:[彼岸]",       'position:仮名暦'],                             # 36: 太陽黄経
    [Note, 0xFFFF, "label:[社=ja:%%<社日>]",
                                         'position:中段 中段 中段 中段', 'suffix:日'],   # 37: 干 太陽黄経
    [Note, 0xFFFF, "label:[三伏]",       'position:中段 中段 中段 中段'],                # 38: 干 太陽黄経
    [Note, 0x3FFC, "label:[除手足甲=]",  'position:中段 中段 中段 中段'],                # 39: 晦(除手足甲)、支(片方のみ), 没滅凶会日×
    [Note, 0x3FFC, "label:[沐浴=]",      'position:中段 中段 中段 中段'],                # 40: 支 没滅凶会日×
    [Note, 0x3FFD, "label:[臘=ja:%%<臘日>]",
                                         'position:中段 中段 中段 中段', 'suffix:日'],   # 41: 支 太陽黄経
    [Note, 0x3FFC, "label:[伐=]",        'position:上段 中段 中段 中段上', 'suffix:日'], # 42: 干支
    [Note, 0x3FFC, "label:[五墓=ja:%%<暦注下段>#%.<五墓日>]",
                                         'position:上段 上段 中段 中段下', 'suffix:日'], # 43: 干支
    [Note, 0x3FFC, "label:[六蛇=]",      'position:上段 上段 中段 中段上'],              # 44: 干支 節月
    [Note, 0x3FFC, "label:[七鳥=]",      'position:上段 上段 中段 中段上'],              # 45: 干支 節月
    [Note, 0x3FFC, "label:[八龍=]",      'position:上段 上段 中段 中段上'],              # 46: 干支 節月
    [Note, 0x3FFC, "label:[九虎=]",      'position:上段 中段 中段 中段上'],              # 47: 干支 節月
    [Note, 0x07FF, "label:[没=ja:%%<没日>]",
                                         'position:中段 中段 中段 中段', 'suffix:日'],   # 48: 太陽黄経
    [Note, 0xFFF8, "label:[日食]",       'position:中段 中段 中段 中段'],                # 49: 日食表
    [Note, 0x07FC, "label:[滅=ja:%%<滅日]",
                                         'position:中段 中段 中段 中段', 'suffix:日'],   # 50: 月の位相
    [Note, 0xFFF8, "label:[月食]",       'position:中段 中段 中段 中段'],                # 51: 月食表
    [Note, 0xC7FD, "label:[月相]",       'position:中段 中段 中段 中段'],                # 52: 月の位相
    [Note, 0xFFFF, "label:[土用事=ja:%%<土用>]",
                                         'position:中段 中段 中段 中段'],                # 53: 太陽黄経
    [Note, 0x3FF0, "label:[伏龍=]",      'position:上段 上段 下段 下段', 'suffix:在'],   # 54: 太陽黄経

    [Note, 0x3FFF, "label:[凶会=ja:%%<暦注下段>#%.<凶会日>]",
                                         'position:下段 下段 下段 下段', 'suffix:日'],   # 55: 干支 節月(宣明暦以前)/暦月(貞享暦以降)
    [Note, 0x3FFF, "label:[大小歳=]",    'position:下段 下段 下段 下段'],                # 56: 干支 節月
    [Note, 0x3FFC, "label:[歳徳=ja:%%<歳徳神>]",
                                         'position:下段 下段 下段 下段'],                # 57: 干 節年 凶会日× ~合も
    [Note, 0x0003, "label:[天倉=]",      'position:古注'],                               # 58: 干支 節月
  # [Note, 0x0003, "label:[天李=]",      'position:古注'],                               #     干支 節月?
    [Note, 0x37FF, "label:[天恩=ja:%%<暦注下段>#%.<天恩日>]",
                                         'position:下段 下段 下段 下段', 'suffix:日'],   # 59: 干支 節月 凶会日×
    [Note, 0xFFFF, "label:[天赦=ja:%%<暦注下段>#%.<天赦日>]",
                                         'position:下段 下段 下段 下段'],                # 60: 干支 節月
    [Note, 0x37FF, "label:[母倉=ja:%%<暦注下段>#%.<母倉日>]",
                                         'position:下段 下段 下段 下段', 'suffix:日'],   # 61: 支 節月 凶会日×
    [Note, 0x37FC, "label:[月徳=]",      'position:下段 下段 下段 下段'],                # 62: 干 節月 凶会日× ~合も
    [Note, 0x3FFF, "label:[九坎=]",      'position:下段 下段 下段 下段'],                # 63: 支 節月
    [Note, 0x3FFF, "label:[歸忌=ja:%%<暦注下段>#%.<帰忌日>]",
                                         'position:下段 下段 下段 下段', 'suffix:日'],   # 64: 支 節月
    [Note, 0x3FFF, "label:[血忌=ja:%%<暦注下段>#%.<血忌日>]",
                                         'position:下段 下段 下段 下段', 'suffix:日'],   # 65: 支 節月
    [Note, 0x3FFC, "label:[無翹=]",      'position:下段 下段 下段 下段'],                # 66: 支 節月
    [Note, 0x3FFF, "label:[厭=]",        'position:下段 下段 下段 下段'],                # 67: 支 節月
    [Note, 0x3FFC, "label:[重=ja:%%<暦注下段>#%.<重日>]",
                                         'position:下段 下段 下段 下段', 'suffix:日'],   # 68: 支
    [Note, 0x3FFD, "label:[復=ja:%%<暦注下段>#%.<復日>]",
                                         'position:下段 下段 下段 下段', 'suffix:日'],   # 69: 干 節月
    [Note, 0x3FFC, "label:[月煞=]",      'position:下段 下段 下段 下段'],                # 70: 支 節月
    [Note, 0x3FFF, "label:[往亡=ja:%%<暦注下段>#%.<往亡日>]",
                                         'position:下段 下段 下段 下段', 'suffix:日'],   # 71: 太陽黄経
    [Note, 0x3FFF, "label:[日遊=ja:%%<日遊神>]",
                                         'position:最下段', 'suffix:在'],                # 72: 干支
    [Note, 0x07FF, "label:[人神配当=]",  'position:最下段孟月', 'suffix:-'],             # 73: 暦日

    [Note, 0x3E00, "label:[受死=ja:%%<暦注下段>#%.<受死日>]",
                                         'position:仮名暦', 'suffix:日'],                # 74: 支 節月
    [Note, 0xFFF0, "label:[八專]",       'position:仮名暦'],                             # 75: 干支
    [Note, 0x3E00, "label:[八專間日=ja:%%<八専>]",
                                         'position:仮名暦'],                             # 76: 干支
    [Note, 0xC000, "label:[金神間日=ja:%%<金神>#%.<金神の遊行・間日>]",
                                         'position:仮名暦'],                             # 77: 支 節月
    [Note, 0xC000, "label:[金神遊行=ja:%%<金神>#%.<金神の遊行・間日>]",
                                         'position:仮名暦'],                             # 78: 支 節月
    [Note, 0x3FF0, "label:[天火=ja:%%<暦注下段>#%.<天火日>]",
                                         'position:仮名暦', 'suffix:日'],                # 79: 支 節月
    [Note, 0x3FF0, "label:[地火=ja:%%<暦注下段>#%.<地火日>]",
                                         'position:仮名暦', 'suffix:日'],                # 80: 支 節月
    [Note, 0x3800, "label:[人火=]",      'position:仮名暦'],                             # 81: 支 節月
    [Note, 0x3800, "label:[雷火=]",      'position:仮名暦'],                             # 82: 支 節月
    [Note, 0x3FF0, "label:[赤舌=ja:%%<赤舌日>]",
                                         'position:仮名暦', 'suffix:日'],                # 83: 暦月 暦日
    [Note, 0x3E00, "label:[十死=ja:%%<暦注下段>#%.<十死日>]",
                                         'position:仮名暦', 'suffix:日'],                # 84: 支 節月
    [Note, 0x3E00, "label:[道虚=]",      'position:仮名暦', 'suffix:日'],                # 85: 暦日
    [Note, 0x3E00, "label:[大明=ja:%%<暦注下段>#%.<大明日>]",
                                         'position:仮名暦', 'suffix:日'],                # 86: 干支
    [Note, 0x0600, "label:[大赤=ja:%%<赤口日>]",
                                         'position:仮名暦', 'suffix:日'],                # 87: 暦月 暦日
    [Note, 0xF800, "label:[甲子待=ja:%%<甲子>]",
                                         'position:仮名暦'],                             # 88: 干支
    [Note, 0xC000, "label:[己巳]",       'position:仮名暦'],                             # 89: 干支
    [Note, 0xF800, "label:[庚申待]",     'position:仮名暦'],                             # 90: 干支
    [Note, 0x3800, "label:[犯土]",       'position:仮名暦'],                             # 91: 干支
    [Note, 0xF800, "label:[十方暮]",     'position:仮名暦'],                             # 92: 干支
    [Note, 0xF800, "label:[一粒万倍=ja:%%<一粒万倍日>]",
                                         'position:仮名暦', 'suffix:日'],                # 93: 支 節月
    [Note, 0x3800, "label:[天福=]",      'position:仮名暦'],                             # 94: 支 節月
    [Note, 0x3800, "label:[地福=]",      'position:仮名暦'],                             # 95: 支 節月
    [Note, 0x3800, "label:[地五福=]",    'position:仮名暦'],                             # 96: 支 節月
    [Note, 0xB800, "label:[三隣亡]",     'position:仮名暦'],                             # 97: 支 節月
    [Note, 0xF800, "label:[不成就=ja:%%<不成就日>]",
                                         'position:仮名暦', 'suffix:日'],                # 98: 暦月 暦日/晦日
    [Note, 0x3FFF, "label:[三寶吉=ja:%%<三宝吉>]",
                                         'position:上段 上段 上段 上段'],                # 99: 干支 節月(宣明暦以前)/暦月(貞享暦以降)
    [Note, 0x3FFF, "label:[神吉=ja:%%<暦注下段>#%.<神日>]",
                                         'position:上段 上段 中段 中段上', 'suffix:日'], #100: 干支 節月
    [Note, 0x3FFF, "label:[雑事吉=]",    'position:雑事吉'],                             #101: 干支 節月(宣明暦以前)/暦月(貞享暦以降)
    [Note, 0x07FF, "label:[小字注=]",    'position:下段小字 下段小字 下段小字 下段小字'],#102: 干支 節月(宣明暦以前)/暦月(貞享暦以降)
  ]
]]
NoteTypes =

日本暦注の時代変遷

(3...When::TM::CalendarEra::JapaneseSolarSeries[1].size).to_a.map {|i|
  calendars =
    [When::TM::CalendarEra::JapaneseLuniSolarSeries[1][i][2],
     When::TM::CalendarEra::JapaneseSolarSeries[1][i][2]].map {|epoch|
      epoch =~ /^(-?\d+)-(\d+)-(\d+)\^(.+)$/
      $4
    }
  [$2 == '01' ? $1.to_i : $1.to_i+1, Cal4Note.new(*calendars)]
}.reverse
NoteRange =
[
  # 開始 具注暦 七十二候        index mask
  [-660,    0,      0], # ~ 696  0 : 0001
  [ 697,    0,      0], # ~ 763  1 : 0002
  [ 764,    0,      2], # ~ 800  2 : 0004
  [ 801,    0,      2], # ~ 900  3 : 0008
  [ 901,    0,      2], # ~1003  4 : 0010
  [1004,    1,      2], # ~1047  5 : 0020
  [1048,    1,      2], # ~1100  6 : 0040
  [1101,    1,      2], # ~1184  7 : 0080
  [1185,    2,      2], # ~1300  8 : 0100
  [1301,    2,      2], # ~1337  9 : 0200
  [1338,    3,      2], # ~1684 10 : 0400
  [1685,    3,      3], # ~1754 11 : 0800
  [1755,    3,      4], # ~1867 12 : 1000
  [1868,    3,      4], # ~1872 13 : 2000
  [1873,    3,      4], # ~1873 14 : 4000
  [1874,    3,      5]  # ~     15 : 8000
]
NoteFocused =
(0...NoteRange.size).to_a.map {|range|
  (3..5).to_a.map {|cord|
    notes = NoteObjects[1][cord]
    (2...notes.size).to_a.inject([]) {|focused,note|
      focused << notes[note][2][/\[.+?[=\]]/][1..-2] if notes[note][1][range] == 1
      focused
    }
  }
}
MonthPattern =

月の大小

{
   29 => '',
   30 => '',
  -28 => '',
  -29 => '',
  -30 => '',
  -31 => ''
}
NoteMethods =
[:year_notes, :month_notes, :day_notes]

Constants inherited from When::CalendarTypes::CalendarNote

BahaiNotes, ChineseNotes, DefaultNotes, JavaneseNotes, JulianDayNotes, MayanNotes, TibetanNotes, YiNotes

Constants included from Parts::Resource

Parts::Resource::LabelProperty

Instance Attribute Summary

Attributes inherited from When::CalendarTypes::CalendarNote

#event

Attributes inherited from TM::ReferenceSystem

#domain_of_validity, #position

Attributes inherited from BasicTypes::Object

#label

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

#domain, #name

Methods included from Parts::Resource

#[], #^, _decode, _encode, _extract_prefix, _instance, _parse, _path_with_prefix, _replace_tags, _setup_, #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

#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, ...

Note:

return 値の [Hash] の要素は下記の通り :note => 暦注要素 (When::CalendarTypes::JapaneseNote::Note) :value => 暦注の値 (String or When::BasicTypes::M17n または、その Array) :position => 具注暦でのその暦注の配置場所(String)

暦注の計算

Parameters:

Returns:

  • (Hash)

    :notes が String の場合

  • (Array<Hash>)

    上記に該当せず、:indices が Integer の場合

  • (Array<Array<Hash>>)

    上記のいずれにも該当しない場合



512
513
514
515
516
517
518
# File 'lib/when_exe/region/japanese_notes.rb', line 512

def notes(date, options={})
  dates, indices, notes, conditions, options = _parse_note(date, options)
  _result(indices.map {|i|
    next [] unless i <= dates.precision
    send(NoteMethods[i-1], dates, notes[i-1], conditions)
  }, options)
end