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

- old
+ new

@@ -6,14 +6,13 @@ =end module When class BasicTypes::M17n - JewishTerms = [self, [ - "namespace:[en=http://en.wikipedia.org/wiki/, ja=http://ja.wikipedia.org/wiki/]", + Jewish = [self, [ "locale:[=en:, ja=ja:, alias]", - "names:[JewishTerms=]", + "names:[Jewish=]", "[Jewish=en:Hebrew_calendar, ユダヤ暦]", [self, "names:[IntercalaryMonth=en:Intercalation, 閏月]", "[%s I=, 第1=]", @@ -42,11 +41,10 @@ # # Anno Mundi epoch # Jewish = [self, [ - "namespace:[en=http://en.wikipedia.org/wiki/, ja=http://ja.wikipedia.org/wiki/]", "locale:[=en:, ja=ja:, alias]", "area:[Israel, イスラエル]", ["[AnnoMundi=en:Anno_Mundi, ユダヤ紀元, *alias:HY]1.1.1", "Calendar Epoch", "01-01-01^Jewish"], ]] end @@ -56,15 +54,17 @@ # # Jewish Calendar # class Jewish < TableBased + include Lunar + private # オブジェクトの正規化 def _normalize(args=[], options={}) - @label = When.Resource('_m:JewishTerms::Jewish') + @label = 'Jewish::Jewish' # Default Parameters Rational @epoch_in_CE ||= 1 @origin_of_MSC ||= 3761 @@ -79,13 +79,12 @@ @date_shift = @mean_month / @leap_period @mean_year = 12 * @mean_month + @leap_number * @date_shift # Month & Day Index @indices ||= [ - Coordinates::Index.new({:branch=>{-1=>When.Resource('_m:JewishTerms::IntercalaryMonth::*')[0], - 1=>When.Resource('_m:JewishTerms::IntercalaryMonth::*')[1]}, - :trunk=>m17n('[::_m:JewishTerms::Month::*]')}), - Coordinates::DefaultDayIndex + When.Index('Jewish::Month', {:branch=>{-1=>When.Resource('_m:Jewish::IntercalaryMonth::*')[0], + 1=>When.Resource('_m:Jewish::IntercalaryMonth::*')[1]}}), + When::Coordinates::DefaultDayIndex ] # Month & Day Arrangement @rule_table ||= { 353 => {'Length'=>[30,29,29,29] + [30,29]*4, 'IDs'=>'1,2,3,4,5,6,7,8,9,10,11,12' },