class Zakuro::Daien::Gateway

Gateway アクセサメソッド群

Constants

RELEASE

@return [True] リリースあり

VERSION_NAME

@return [String] 暦クラス名

Public Class Methods

to_japan_date(western_date:) click to toggle source

西暦日から和暦日に変換する

@param [Date] western_date 西暦日

@return [Result::Single] 和暦日

# File lib/zakuro/version/daien/daien.rb, line 28
def self.to_japan_date(western_date:)
  date = Western::Calendar.create(date: western_date)

  context = Context.new(version_name: VERSION_NAME)
  Calculation::Summary::Single.get(context: context, date: date)
end