Skip to content
instance method

Date#strftime

(?::String format) -> ::String
strftime(format = '%F') → string

Returns a string representation of the date in self, formatted according the given format:

Example
Date.new(2001, 2, 3).strftime # => "2001-02-03"

For other formats, see Formats for Dates and Times.

See also #step #succ #start #sunday? also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0