instance method
Date#strftime
(?::String format) -> ::String
strftime(format = '%F') → string
ext/date/date_core.c
View on GitHub ↗
static VALUE
d_lite_strftime(int argc, VALUE *argv, VALUE self)
{
return date_strftime_internal(argc, argv, self,
"%Y-%m-%d", set_tmx);
}
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.