module Time::Format::ISO_8601_DATE_TIME

Overview

The ISO 8601 date time format.

Time::Format::ISO_8601_DATE_TIME.format(Time.utc(2016, 2, 15, 4, 35, 50)) # => "2016-02-15T04:35:50Z"
Time::Format::ISO_8601_DATE_TIME.parse("2016-02-15T04:35:50Z")            # => 2016-02-15 04:35:50.0 UTC

Defined in:

time/format/custom/iso_8601.cr

Class Method Summary

Class Method Detail

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

Formats a Time into the given io.


[View source]
def self.format(time : Time) : String #

Formats a Time into a String.


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

Parses a string into a Time.


[View source]