Class: JPDate
- Inherits:
-
Date
show all
- 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
date.short_era
Defined Under Namespace
Modules: Era
Classes: Holiday
Constant Summary
collapse
- VERSION =
"0.2.5"
Instance Method Summary
collapse
Instance Method Details
#era ⇒ Object
18
19
20
|
# File 'lib/jpdate.rb', line 18
def era
Era.name_year(year, month, day)
end
|
#holiday ⇒ Object
14
15
16
|
# File 'lib/jpdate.rb', line 14
def holiday
Holiday.name(self)
end
|
#short_era ⇒ Object
22
23
24
|
# File 'lib/jpdate.rb', line 22
def short_era
Era.short_name_year(year, month, day)
end
|