NEVER | = | Time.mktime(2038) |
ZERO | = | Time.mktime(1972) |
FORMAT | = | { :db => "%Y-%m-%d %H:%M:%S", :dbase => "%Y-%m-%d %H:%M:%S", :datbase => "%Y-%m-%d %H:%M:%S", :utc => "%Y-%m-%d %H:%M:%S", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M", :day1st => "%d-%m-%Y %H:%M", :dmYHM => "%d-%m-%Y %H:%M", :rfc822 => "%a, %d %b %Y %H:%M:%S %z", nil => "%a %b %d %H:%M:%S %Z %Y" |
This method calculates the days extrema given two time objects. start time is the given time1 at 00:00:00 end time is the given time2 at 23:59:59:999
Input:
Output:
Tracks the elapse time of a code block.
Time.elapse { sleep 1 } #=> 0.999188899993896
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!
Returns a new Time representing the start of the month (1st of the month, 0:00)
Returns a new Time where one or more of the elements have been changed according to the options parameter. The time options (hour, minute, sec, usec) reset cascadingly, so if only the hour is passed, then minute, sec, and usec is set to 0. If the hour and
minute is passed, then sec and usec is set to 0.
Returns true only if day of time is included in the range (stime..etime). Only year days are checked.
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!