Plain-English convenience methods module designed for the Time class.
- ago
- at_beginning_of_day
- at_beginning_of_month
- at_beginning_of_week
- at_beginning_of_year
- at_midnight
- beginning_of_day
- beginning_of_month
- beginning_of_week
- beginning_of_year
- in
- in_day_range?
- last_month
- last_year
- midnight
- monday
- months_ago
- months_since
- next_month
- next_week
- next_year
- seconds_since_midnight
- since
- start_of_day
- to_end_of_day
- to_start_of_day
- tomorrow
- years_ago
- years_since
- yesterday
| NEVER | = | Time.mktime(2038) |
| ZERO | = | Time.mktime(1972) |
Returns a new Time representing the time a number of seconds ago. Do not use this method in combination with x.months, use months_ago instead!
Alias for beginning_of_day
Alias for beginning_of_month
Alias for beginning_of_week
Alias for beginning_of_year
Alias for beginning_of_day
Returns a new Time representing the start of the month (1st of the month, 0:00)
Returns a new Time representing the "start" of this week (Monday, 0:00)
Returns a new Time representing the start of the year (1st of january, 0:00)
Alias for since
Returns true only if day of time is included in the range (stime..etime). Only year days are checked.
Short-hand for months_ago(1)
Short-hand for months_ago(1)
Alias for beginning_of_day
Alias for beginning_of_week
Returns a new Time representing the time a number of specified months ago.
Short-hand for months_since(1)
Returns a new Time representing the start of the given day in next week (default is Monday).
Short-hand for months_since(1)
Seconds since midnight: Time.now.seconds_since_midnight
Returns a new Time representing the time a number of seconds since the instance time. Do not use this method in combination with x.months, use months_since instead!
Alias for beginning_of_day
Rrturns a new time at end of day
Returns a new time at start of day
Convenience method which returns a new Time representing the time 1 day since the instance time
Returns a new Time representing the time a number of specified years ago.