--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Formats a date/time instance using a defined format
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "format<Symbol>:"
    body: of the format key from Date.date_formats
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Returns
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "String:"
    body: formatted string
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "  Time.now.formatted(:rfc822) # =&gt; &quot;Sun, 16 Nov 2007 00:21:16 -0800&quot;\n  Time.now.formatted(:db) # =&gt; &quot;2008-11-16 00:22:09&quot;\n"
- !ruby/struct:SM::Flow::P 
  body: You can also add your own formats using +Date.add_format+ when your app loads.
- !ruby/struct:SM::Flow::P 
  body: "# Add the following to your init.rb"
- !ruby/struct:SM::Flow::VERB 
  body: "  Merb::BootLoader.before_app_loads do\n    Date.add_format(:matt, &quot;%H:%M:%S %Y-%m-%d&quot;)\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: "# Format a Time instance with the format you just specified"
- !ruby/struct:SM::Flow::VERB 
  body: "  Time.now.formatted(:matt) # =&gt; &quot;00:00:00 2007-11-02&quot;\n"
full_name: DateAndTimeFormatting::InstanceMethods#formatted
is_singleton: false
name: formatted
params: (format = :default)
visibility: public
