to_formatted_s(format = :default) public

Returns a string of the object’s date and time.

This method is aliased to to_fs.

Accepts an optional format:

  • :default - default value, mimics Ruby Time#to_s format.

  • :db - format outputs time in UTC :db time. See Time#to_formatted_s(:db).

  • Any key in Time::DATE_FORMATS can be used. See active_support/core_ext/time/conversions.rb.

Show source
Register or log in to add new notes.