lib/when_exe/region/roman.rb in when_exe-0.3.5 vs lib/when_exe/region/roman.rb in when_exe-0.3.6

- old
+ new

@@ -7,14 +7,13 @@ module When class BasicTypes::M17n - RomanTerms = [self, [ - "namespace:[en=http://en.wikipedia.org/wiki/, ja=http://ja.wikipedia.org/wiki/]", + Roman = [self, [ "locale:[=en:, ja=ja:, alias]", - "names:[RomanTerms=]", + "names:[Roman=]", [self, # ..CE-44 / ..BCE45 "names:[MonthA, 月=ja:%%<月_(暦)>]", "[Ianuarius, 1月]", "[Februarius, 2月]", @@ -93,22 +92,20 @@ class TM::CalendarEra # From http://en.wikipedia.org/wiki/Julian_calendar#Sacrobosco.27s_theory_on_month_lengths Julian = [self, [ - "namespace:[en=http://en.wikipedia.org/wiki/, ja=http://ja.wikipedia.org/wiki/]", "locale:[=en:, ja=ja:, alias]", "period:[Roman=en:Roman_calendar, ローマ暦]", ["[AUC=en:Ab_urbe_condita, 建国紀元=ja:%%<ローマ建国紀元>, alias:Ab_urbe_condita]709.1.1", "Calendar Epoch", "-44-01-01^JulianA", "-7-03-01^JulianB", "8-01-01^JulianC", "476-09-04"] ]] # From http://www.tyndalehouse.com/Egypt/ptolemies/chron/roman/chron_rom_intro_fr.htm Roman = [self, [ - "namespace:[en=http://en.wikipedia.org/wiki/, ja=http://ja.wikipedia.org/wiki/]", "locale:[=en:, ja=ja:, alias]", "period:[Roman=en:Roman_calendar, ローマ暦]", ["[AUC=en:Ab_urbe_condita, 建国紀元=ja:%%<ローマ建国紀元>, alias:Ab_urbe_condita]492.5.1", "Calendar Epoch", "-261-05-01^RomanA?border=0-5-1", "-221-03-01^RomanA?border=0-3-1", @@ -122,13 +119,13 @@ end module CalendarTypes # From http://en.wikipedia.org/wiki/Julian_calendar#Sacrobosco.27s_theory_on_month_lengths - _Index0 = Coordinates::DefaultDayIndex - _IndicesB12 = [Coordinates::Index.new({:unit=>12, :trunk=>When.Resource('_m:RomanTerms::MonthB::*')}), _Index0] - _Indices12 = [Coordinates::Index.new({:unit=>12, :trunk=>When.Resource('_m:RomanTerms::Month::*')}), _Index0] + _Index0 = When::Coordinates::DefaultDayIndex + _IndicesB12 = [When.Index('Roman::MonthB', {:unit=>12}), _Index0] + _Indices12 = [When.Index('Roman::Month', {:unit=>12}), _Index0] # # Julian Calendar A : BCE45-BCE8 # JulianA = [CyclicTableBased, { @@ -138,11 +135,11 @@ 'rule_table' => { 'T' => {'Rule' =>[365,366,365]}, 365 => {'Length'=>[31,29] + [31,30]*5}, 366 => {'Length'=>[31,30] + [31,30]*5} }, - 'note' => 'RomanNote' + 'note' => 'Roman' }] # # Julian Calendar B : BCE8-CE7 # @@ -152,37 +149,37 @@ 'indices' => _IndicesB12, 'rule_table' => { 'T' => {'Rule' =>[365]}, 365 => {'Length'=>[31,28] + [31,30,31,30,31]*2} }, - 'note' => 'RomanNote' + 'note' => 'Roman' }] # # Julian Calendar C : CE8- # JulianC = [Julian, { 'indices' => _Indices12, - 'note' => 'RomanNote' + 'note' => 'Roman' }] - # From http://www.tyndalehouse.com/Egypt/ptolemies/chron/roman/chron_rom_intro_fr.htm + # From Chris Bennett, http://www.tyndalehouse.com/Egypt/ptolemies/chron/roman/chron_rom_intro_fr.htm # # Roman Calendar BCE262-(CE60)-CE480 # # _ID_N = '1,2,3,4,5,6,7,8,9,10,11,12' _ID_L = '1,2,2=,3,4,5,6,7,8,9,10,11,12' _ID_J = '1,2,2=,3,4,5,6,7,8,9,10,11,11<,11>,12' _Branch = { - 1=>When.Resource('_m:RomanTerms::IntercalaryMonth::*')[0], - 0.5=>When.Resource('_m:RomanTerms::IntercalaryMonth::*')[1], - 1.5=>When.Resource('_m:RomanTerms::IntercalaryMonth::*')[2] + 1=>When.Resource('_m:Roman::IntercalaryMonth::*')[0], + 0.5=>When.Resource('_m:Roman::IntercalaryMonth::*')[1], + 1.5=>When.Resource('_m:Roman::IntercalaryMonth::*')[2] } - _IndicesA = [Coordinates::Index.new({:branch=>_Branch, :trunk=>When.Resource('_m:RomanTerms::MonthA::*')}), _Index0] - _IndicesB = [Coordinates::Index.new({:branch=>_Branch, :trunk=>When.Resource('_m:RomanTerms::MonthB::*')}), _Index0] - _Indices = [Coordinates::Index.new({:branch=>_Branch, :trunk=>When.Resource('_m:RomanTerms::Month::*')}), _Index0] - _IndicesC = [Coordinates::Index.new({:branch=>_Branch, :trunk=>When.Resource('_m:RomanTerms::MonthC::*')}), _Index0] + _IndicesA = [When.Index('Roman::MonthA', {:branch=>_Branch}), _Index0] + _IndicesB = [When.Index('Roman::MonthB', {:branch=>_Branch}), _Index0] + _Indices = [When.Index('Roman::Month', {:branch=>_Branch}), _Index0] + _IndicesC = [When.Index('Roman::MonthC', {:branch=>_Branch}), _Index0] Options = { 'origin_of_LSC' => 1625698, 'origin_of_MSC' => -261, 'indices' => _Indices, 'rule_table' => { @@ -199,25 +196,24 @@ 'C' => {'Length'=>[29, 24, 27, 31, 29, 31, 29, 31, 29, 29, 31, 29, 29], 'IDs'=>_ID_L}, 'J' => {'Length'=>[29, 24, 27, 31, 29, 31, 29, 31, 29, 29, 31, 34, 31, 31, 29], 'IDs'=>_ID_J}, 'N' => {'Length'=>[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]}, 'L' => {'Length'=>[31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]}, }, - 'note' => 'RomanNote' + 'note' => 'Roman' } RomanA = [CyclicTableBased, Options.merge({'indices' => _IndicesA})] RomanB = [CyclicTableBased, Options.merge({'indices' => _IndicesB})] Roman = [CyclicTableBased, Options] RomanC = [CyclicTableBased, Options.merge({'indices' => _IndicesC})] end # # 古代ローマの暦注 # - class CalendarNote::RomanNote < CalendarNote + class CalendarNote::Roman < CalendarNote - NoteObjects = [When::BasicTypes::M17n, [ - "namespace:[en=http://en.wikipedia.org/wiki/, ja=http://ja.wikipedia.org/wiki/]", + Notes = [When::BasicTypes::M17n, [ "locale:[=en:, ja=ja:, alias]", "names:[Roman]", # 年の暦注 ---------------------------- [When::BasicTypes::M17n, @@ -230,10 +226,10 @@ [When::Coordinates::Residue, "label:[Metonic=en:Metonic_cycle, 太陰章=]", "divisor:19", "year:0", ], [When::Coordinates::Residue, - "label:[Indiction, インディクション]", "divisor:15", "year:-2", + "label:[Indiction, インディクション]", "divisor:15", "year:-2", "format:[%s=]", [When::Coordinates::Residue, "label:[I= ]", "remainder: 0"], [When::Coordinates::Residue, "label:[II= ]", "remainder: 1"], [When::Coordinates::Residue, "label:[III= ]", "remainder: 2"], [When::Coordinates::Residue, "label:[IV= ]", "remainder: 3"], [When::Coordinates::Residue, "label:[V= ]", "remainder: 4"],