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)

    年初の通日



1067
1068
1069
# File 'lib/when_exe/calendartypes.rb', line 1067

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

#_normalize_engineObject

オブジェクトの正規化



1072
1073
1074
1075
1076
1077
# File 'lib/when_exe/calendartypes.rb', line 1072

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