method

to_fs

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveSupport::TimeWithZone
to_fs(format = :default) public

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

This method is aliased to to_formatted_s.

Accepts an optional format:

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

  • :db - format outputs time in UTC :db time. See Time#to_fs(: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.