Skip to content
instance method

Date#iso8601

() -> ::String
iso8601 → string

Equivalent to strftime with argument '%Y-%m-%d' (or its shorthand form '%F');

Example
Date.new(2001, 2, 3).iso8601 # => "2001-02-03"
See also .iso8601 #inspect #italy #infinite? also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0