Skip to content

Commit 900191f

Browse files
committed
doc: date/conversions.rb should talk about date format not time format.
Closes rails#13245. [ci skip]
1 parent 7cf9a43 commit 900191f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activesupport/lib/active_support/core_ext/date/conversions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ class Date
3737
# date.to_formatted_s(:rfc822) # => "10 Nov 2007"
3838
# date.to_formatted_s(:iso8601) # => "2007-11-10"
3939
#
40-
# == Adding your own time formats to to_formatted_s
40+
# == Adding your own date formats to to_formatted_s
4141
# You can add your own formats to the Date::DATE_FORMATS hash.
4242
# Use the format name as the hash key and either a strftime string
4343
# or Proc instance that takes a date argument as the value.
4444
#
45-
# # config/initializers/time_formats.rb
45+
# # config/initializers/date_formats.rb
4646
# Date::DATE_FORMATS[:month_and_year] = '%B %Y'
4747
# Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") }
4848
def to_formatted_s(format = :default)

0 commit comments

Comments
 (0)