usec

usec() Instance Public methods Returns the fraction of a second as microseconds

to_s

to_s(format = :default) Instance Public methods Also aliased as: to_default_s

to_i

to_i() Instance Public methods Converts self to an integer number of seconds since the Unix epoch.

to_formatted_s

to_formatted_s(format = :default) Instance Public methods Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. This method is aliased to to_s. Examples datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" datetime.to_s(:db) # => "2007-12-04 00:00:00" datetime.to_s(:number) # => "20071204000000" datetime.t

to_f

to_f() Instance Public methods Converts self to a floating-point number of seconds since the Unix epoch.

to_default_s

to_default_s(format = :default) Instance Public methods Alias for: to_s

since

since(seconds) Instance Public methods Returns a new DateTime 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! in

seconds_until_end_of_day

seconds_until_end_of_day() Instance Public methods Returns the number of seconds until 23:59:59. DateTime.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 DateTime.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 DateTime.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0

seconds_since_midnight

seconds_since_midnight() Instance Public methods Seconds since midnight: DateTime.now.seconds_since_midnight.

readable_inspect

readable_inspect() Instance Public methods Overrides the default inspect method with a human readable one, e.g., âMon, 21 Feb 2005 14:30:00 +0000â. inspect