module EraJaHelper

Public Instance Methods

to_era(year, month = 1, day = 1) click to toggle source
# File lib/ruboty/wareki/actions/era_ja_helper.rb, line 4
def to_era(year, month = 1, day = 1)
  Date.new(year, month, day).to_era("%O%E年")
rescue => e
  "1868/09/08 以降の日付のみ対応しています"
end
year() click to toggle source
# File lib/ruboty/wareki/actions/era_ja_helper.rb, line 10
def year
  message[:year].to_i
end