Class: Date

Inherits:
Object show all
Defined in:
lib/vanity/backport.rb

Instance Method Summary collapse

Instance Method Details

#to_dateObject

Backported from Ruby 1.9.



14
15
16
# File 'lib/vanity/backport.rb', line 14

def to_date
  self
end

#to_timeObject

Backported from Ruby 1.9.



21
22
23
# File 'lib/vanity/backport.rb', line 21

def to_time
  Time.local(year, mon, mday) 
end