diff --git a/lib/date.rb b/lib/date.rb index 079a6059bbb2a3..30f5e140f4fe26 100644 --- a/lib/date.rb +++ b/lib/date.rb @@ -211,6 +211,11 @@ # The Date class includes the Comparable module, allowing # date objects to be compared and sorted, ranges of dates # to be created, and so forth. +# +# See the Date::parse and Date::strptime methods to parse Dates +# and Date#strftime for formatting Dates. See Time#strftime for +# details on supported formats. + class Date include Comparable @@ -1024,7 +1029,7 @@ def self.new_by_frags(elem, sg) # :nodoc: # # +str+ is a String holding a date representation. # +fmt+ is the format that the date is in. See - # date/format.rb for details on supported formats. + # Time#strftime for details on supported formats. # # The default +str+ is '-4712-01-01', and the default # +fmt+ is '%F', which means Year-Month-Day_of_Month. diff --git a/lib/date/format.rb b/lib/date/format.rb index 6894e945e3a9b0..7b6eb55ea89862 100644 --- a/lib/date/format.rb +++ b/lib/date/format.rb @@ -210,6 +210,7 @@ def emit_au(e, w, f) # :nodoc: private :emit, :emit_w, :emit_n, :emit_sn, :emit_z, :emit_a, :emit_ad, :emit_au + # See Time#strftime for details on supported formats. def strftime(fmt='%F') fmt.gsub(/%([-_0^#]+)?(\d+)?([EO]?(?::{1,3}z|.))/m) do f = {}
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: