all_week

all_week(start_day = Date.beginning_of_week) Instance Public methods Returns a Range representing the whole week of the current date/time. Week starts on start_day, default is Date.week_start or config.week_start when set.

all_quarter

all_quarter() Instance Public methods Returns a Range representing the whole quarter of the current date/time.

all_month

all_month() Instance Public methods Returns a Range representing the whole month of the current date/time.

xmlschema

xmlschema() Instance Public methods

to_time

to_time(form = :local) Instance Public methods Converts a Date instance to a Time, where the time is set to the beginning of the day. The timezone can be either :local or :utc (default :local). date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 date.to_time # => Sat Nov 10 00:00:00 0800 2007 date.to_time(:local) # => Sat Nov 10 00:00:00 0800 2007 date.to_time(:utc) # => Sat Nov 10 00:00:00 UTC 2007

to_s

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

to_formatted_s

to_formatted_s(format = :default) Instance Public methods Convert to a formatted string. See DATE_FORMATS for predefined formats. This method is aliased to to_s. date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 date.to_formatted_s(:db) # => "2007-11-10" date.to_s(:db) # => "2007-11-10" date.to_formatted_s(:short) # => "10 Nov" date.to_formatted_s(:long) # => "November 10, 2007" date.to_formatted_s(:long_ordi

to_default_s

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

since

since(seconds) Instance Public methods Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) and then adds the specified number of seconds in

readable_inspect

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