Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/supplement/date.rb,
lib/supplement/date.rb
Direct Known Subclasses
Instance Method Summary collapse
- #d ⇒ Object
- #m ⇒ Object
- #to_a ⇒ Object
- #to_date ⇒ Object
- #to_datetime ⇒ Object
- #to_time ⇒ Object
- #y ⇒ Object
Instance Method Details
#d ⇒ Object
11 |
# File 'lib/supplement/date.rb', line 11 def d ; day ; end |
#m ⇒ Object
10 |
# File 'lib/supplement/date.rb', line 10 def m ; month ; end |
#to_a ⇒ Object
13 |
# File 'lib/supplement/date.rb', line 13 def to_a ; [ year, month, day ] ; end |
#to_date ⇒ Object
38 |
# File 'lib/supplement/date.rb', line 38 def to_date ; self ; end |
#to_datetime ⇒ Object
39 |
# File 'lib/supplement/date.rb', line 39 def to_datetime ; DateTime.new! Date.jd_to_ajd(jd,0,0), @of, @sg ; end |
#to_time ⇒ Object
37 |
# File 'lib/supplement/date.rb', line 37 def to_time ; Time.local year, mon, mday ; end |
#y ⇒ Object
9 |
# File 'lib/supplement/date.rb', line 9 def y ; year ; end |