Class: JPDate
- Inherits:
-
Date
- Object
- Date
- JPDate
- Defined in:
- lib/jpdate.rb,
lib/jpdate/era.rb,
lib/jpdate/holiday.rb,
lib/jpdate/version.rb
Overview
日本の祝日と年号を出力するDateクラス(Dateを継承)
Example:
date = JPDate.parse('2014-9-23')
date.holiday # => "秋分の日"
date.era # => ["平成26年"]
date.short_era # => ["H26"]
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.2"
Instance Method Summary collapse
Instance Method Details
#short_era ⇒ Object
22 23 24 |
# File 'lib/jpdate.rb', line 22 def short_era Era.short_name_year(year, month, day) end |