Time::Format::ISO_8601_DATE - Crystal 1.20.1

# module Time::Format::ISO_8601_DATE

##
Overview

The ISO 8601 date format.

    Time::Format::ISO_8601_DATE.parse("2016-02-15")                      # => 2016-02-15 00:00:00Z
    Time::Format::ISO_8601_DATE.format(Time.utc(2016, 2, 15, 4, 35, 50)) # => "2016-02-15"

##
Defined in:

time/format/custom/iso_8601.cr

##
Class Method Summary

- .format(time : Time, io : IO)

  Formats a `Time` into the given io.

- .format(time : Time) : String

  Formats a `Time` into a `String`.

- .parse(string, location : Time::Location | Nil = Time::Location::UTC) : Time

  Parses a string into a `Time`.

##
Class Method Detail

def self.format(time : Time, io : IO) #

Formats a `Time` into the given io.

def self.format(time : Time) : String #

Formats a `Time` into a `String`.

def self.parse(string, location : Time::Location | Nil = Time::Location::UTC) : Time #

Parses a string into a `Time`.