Module: When::CalendarTypes::SolarYearTableBased::CalendarBased

Defined in:
lib/when_exe/calendartypes.rb

Instance Method Summary collapse

Instance Method Details

#_new_year_sdn(year) ⇒ Integer

年初の通日(別の暦使用)

Parameters:

Returns:

  • (Integer)

    年初の通日



1108
1109
1110
# File 'lib/when_exe/calendartypes.rb', line 1108

def _new_year_sdn(year)
  @engine._coordinates_to_number(year + @diff_to_CE - @engine.diff_to_CE, @engine_month, @engine_day)
end

#_normalize_engineObject

オブジェクトの正規化



1113
1114
1115
1116
1117
1118
# File 'lib/when_exe/calendartypes.rb', line 1113

def _normalize_engine
  Rational
  @engine_month = @engine_month ? @engine_month.to_i - @indices[-2].base : 0
  @engine_day   = @engine_day   ? @engine_day.to_i   - @indices[-1].base : 0
  @engine       = When.Calendar(@engine || When::Gregorian)
end