Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/wareki/std_ext.rb
Overview
:nodoc:
Constant Summary collapse
- JAPAN =
Wareki::GREGORIAN_START
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
._wareki_parse_orig ⇒ Object
26 |
# File 'lib/wareki/std_ext.rb', line 26 alias _wareki_parse_orig parse |
.parse(str, comp = true, start = ::Date::ITALY) ⇒ Object
27 28 29 30 31 |
# File 'lib/wareki/std_ext.rb', line 27 def parse(str, comp = true, start = ::Date::ITALY) Wareki::Date.parse(str).to_date(start) rescue ArgumentError, Wareki::UnsupportedDateRange ::Date._wareki_parse_orig(str, comp, start) end |
Instance Method Details
#_wareki_strftime_orig ⇒ Object
16 |
# File 'lib/wareki/std_ext.rb', line 16 alias _wareki_strftime_orig strftime |
#strftime(format = '%F') ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/wareki/std_ext.rb', line 17 def strftime(format = '%F') if format.index('%J') to_wareki_date.strftime(format) else _wareki_strftime_orig(format) end end |