File: //usr/local/rvm/gems/ruby-3.0.2/doc/activesupport-6.1.4.1/ri/Date/to_formatted_s-i.ri
U:RDoc::AnyMethod[iI"to_formatted_s:ETI"Date#to_formatted_s;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"LConvert to a formatted string. See DATE_FORMATS for predefined formats.;To:RDoc::Markup::BlankLine o;
; [I"-This method is aliased to <tt>to_s</tt>.;T@o:RDoc::Markup::Verbatim; [I"?date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007
;TI"
;TI";date.to_formatted_s(:db) # => "2007-11-10"
;TI";date.to_s(:db) # => "2007-11-10"
;TI"
;TI"7date.to_formatted_s(:short) # => "10 Nov"
;TI"9date.to_formatted_s(:number) # => "20071110"
;TI"Bdate.to_formatted_s(:long) # => "November 10, 2007"
;TI"Ddate.to_formatted_s(:long_ordinal) # => "November 10th, 2007"
;TI"<date.to_formatted_s(:rfc822) # => "10 Nov 2007"
;TI";date.to_formatted_s(:iso8601) # => "2007-11-10"
;T:@format0S:RDoc::Markup::Heading:
leveli: textI"3Adding your own date formats to to_formatted_s;To;
; [I"BYou can add your own formats to the Date::DATE_FORMATS hash. ;TI"FUse the format name as the hash key and either a strftime string ;TI">or Proc instance that takes a date argument as the value.;T@o;; [I"+# config/initializers/date_formats.rb
;TI"3Date::DATE_FORMATS[:month_and_year] = '%B %Y'
;TI"aDate::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") };T;
0:
@fileI"4lib/active_support/core_ext/date/conversions.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_s;To;; [ ;@+;0I"(format = :default);T@+FI" Date;TcRDoc::NormalClass00