Class: Date

Inherits:
Object
  • Object
show all
Defined in:
lib/relative_time.rb

Instance Method Summary collapse

Instance Method Details

#relative_to_now(reference_time = Time.now) ⇒ Object



40
41
42
# File 'lib/relative_time.rb', line 40

def relative_to_now(reference_time=Time.now)
  to_t.relative_to_now(reference_time)
end

#to_tObject



44
45
46
# File 'lib/relative_time.rb', line 44

def to_t
  Time.local(year, month, day, 23, 59, 59)
end