Plain-English convenience methods module designed for the Numeric class.
- after
- ago
- before
- day
- days
- fortnight
- fortnights
- from_now
- hour
- hours
- later
- minute
- minutes
- month
- months
- second
- seconds
- since
- until
- week
- weeks
- year
- years
Calculates time after a given time. Default time is now. Reads best with argument: 10.minutes.after(time)
Alias for before
Calculates time before a given time. Default time is now. Reads best with arguments: 10.days.before( Time.now - 1.day )
Alias for days
Alias for fortnights
Converts fortnights into seconds. (A fortnight is 2 weeks)
Alias for after
Alias for hours
Alias for after
Alias for minutes
Alias for months
Converts months into seconds. WARNING: This is not exact as it assumes 30 days to a month.
Alias for seconds
Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years. The base unit for all of these Numeric time methods is seconds.
Alias for after
Alias for before
Alias for weeks
Alias for years