Getting dates in different convenient string representations and other objects

Methods
T
X
Constants
DATE_FORMATS = { :short => "%e %b", :long => "%B %e, %Y" }
 
Instance Public methods
to_date()

To be able to keep Dates and Times interchangeable on conversions

# File rails/activesupport/lib/active_support/core_ext/date/conversions.rb, line 21
def to_date
  self
end
to_formatted_s(format = :default)
# File rails/activesupport/lib/active_support/core_ext/date/conversions.rb, line 16
def to_formatted_s(format = :default)
  DATE_FORMATS[format] ? strftime(DATE_FORMATS[format]).strip : to_default_s
end
to_time(form = :local)
# File rails/activesupport/lib/active_support/core_ext/date/conversions.rb, line 25
def to_time(form = :local)
  if respond_to?(:hour)
    ::Time.send(form, year, month, day, hour, min, sec)
  else
    ::Time.send(form, year, month, day)
  end
end
xmlschema()
# File rails/activesupport/lib/active_support/core_ext/date/conversions.rb, line 33
def xmlschema
  to_time.xmlschema
end