Class: When::CalendarNote::Zoroastrian

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

Overview

ゾロアスター暦の暦注

Constant Summary collapse

Notes =
[When::BasicTypes::M17n, [
  "locale:[=en:, ja=ja:, alias]",
  "names:[Zoroastrian]",

  # 年の暦注 ----------------------------
  [When::BasicTypes::M17n,
    "names:[note for year=, 年の暦注=, *year]",
  ],

  # 月の暦注 ----------------------------
  [When::BasicTypes::M17n,
    "names:[note for month=, 月の暦注=, *month]",
    [When::BasicTypes::M17n,
      "names:[month name=en:Month, 月の名前=ja:%%<月_(暦)>, zh:該月的名稱=, *alias:Month=]",
      "[Fravardin=   ]",
      "[Ardibehest=  ]",
      "[Khordad=     ]",
      "[Tir=         ]",
      "[Amardad=     ]",
      "[Shehrevar=   ]",
      "[Meher=       ]",
      "[Avan=        ]",
      "[Adar=        ]",
      "[Dae=         ]",
      "[Bahman=      ]",
      "[Aspandarmad= ]",
      "[Gatha Days=  ]"
    ]
  ],

  # 日の暦注 ----------------------------
  [When::BasicTypes::M17n,
    "names:[note for day=, 日の暦注=, *day]",
    [When::BasicTypes::M17n,
      "names:[divinity]",
      "[Hormazd=        ]", # 01
      "[Bahman=         ]", # 02
      "[Ardibehest=     ]", # 03
      "[Shehrevar=      ]", # 04
      "[Aspandarmad=    ]", # 05
      "[Khordad=        ]", # 06
      "[Amardad=        ]", # 07
      "[Daepadar=       ]", # 08
      "[Adar=           ]", # 09
      "[Avan=           ]", # 10
      "[Khorshed=       ]", # 11
      "[Mohor=          ]", # 12
      "[Tir=            ]", # 13
      "[Gosh=           ]", # 14
      "[Daepmeher=      ]", # 15
      "[Meher=          ]", # 16
      "[Srosh=          ]", # 17
      "[Rashne=         ]", # 18
      "[Fravardin=      ]", # 19
      "[Behram=         ]", # 20
      "[Ram=            ]", # 21
      "[Govad=          ]", # 22
      "[Daepdin=        ]", # 23
      "[Din=            ]", # 24
      "[Ashishvangh=    ]", # 25
      "[Ashtad=         ]", # 26
      "[Asman=          ]", # 27
      "[Zamyad=         ]", # 28
      "[Mahrespand=     ]", # 29
      "[Aneran=         ]", # 30
      "[Ahunavad=       ]", # 31
      "[Ushtavad=       ]", # 32
      "[Spentomad=      ]", # 33
      "[Vohukhshathra=  ]", # 34
      "[Vahishtoist=    ]", # 35
      "[intercalary day=]"  # 36
    ]
  ]
]]

Constants inherited from When::CalendarNote

Bahai, CalendarDepend, Chinese, CommonWithRokuyo, CommonWithSovietFiveDay, CommonWithSovietSixDay, Default, Javanese, JulianDay, Mayan, Tibetan, Yis

Constants included from Namespace

Namespace::DC, Namespace::DCQ, Namespace::DCT, Namespace::FOAF, Namespace::OWL, Namespace::RDF, Namespace::RDFC, Namespace::RDFS, Namespace::RSS, Namespace::XSD

Instance Attribute Summary

Attributes inherited from When::CalendarNote

#event

Attributes inherited from TM::ReferenceSystem

#domain_of_validity, #position

Attributes inherited from BasicTypes::Object

#label

Attributes included from Parts::Resource

#child, #keys, #locale, #namespace

Instance Method Summary collapse

Methods inherited from When::CalendarNote

#copy, #day, #duration, #enum_for, #include?, #month, #note?, #notes, #year

Methods inherited from TM::ReferenceSystem

#domain, #name

Methods included from Parts::Resource

#[], #^, _instance, _setup_, _setup_info, base_uri, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #parent, #registered?, root_dir

Methods included from Parts::Resource::Pool

#[], #[]=, #_setup_

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class When::Parts::Resource

Instance Method Details

#divinity(date) ⇒ String

暦注 - 日の名前

Parameters:

Returns:



117
118
119
120
# File 'lib/when_exe/region/zoroastrian.rb', line 117

def divinity(date)
  y, m, d = date.cal_date
  When.CalendarNote('Zoroastrian/Notes::day::divinity::*')[m <= 12 ? d-1 : d+29]
end