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)

    年初の通日



1102
1103
1104
# File 'lib/when_exe/calendartypes.rb', line 1102

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

#_normalize_engineObject

オブジェクトの正規化



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

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