Method: FeCoreExt::CoreExt::DateClassMethods#parse_nengappi

Defined in:
lib/fe_core_ext/core_ext/date.rb

#parse_nengappi(string) ⇒ Object



64
65
66
67
68
# File 'lib/fe_core_ext/core_ext/date.rb', line 64

def parse_nengappi(string)
  string.match(/(\d{4})年(\d+)月(\d+)日/) do
    Date.new(::Regexp.last_match(1).to_i, ::Regexp.last_match(2).to_i, ::Regexp.last_match(3).to_i)
  end
end