module Pretty::Time
Overview
Pretty::Time.parse
is a handy replacement of Time.parse
.
Usage
Pretty::Time.parse("2000-01-02 03:04:05")
Pretty::Time.parse("2000-01-02 03:04:05.678")
Pretty::Time.parse("2000-01-02T03:04:05+0900")
Pretty::Time.parse("2000-01-02T03:04:05.678+09:00")
Defined in:
pretty/time.crClass Method Summary
-
.now(*args, **options) : ::Time
for backward compatibility
- .parse(year : Int32, month : Int32, day : Int32, hour : Int32 = 0, minute : Int32 = 0, second : Int32 = 0, *args, **opts)
- .parse(value : String, location : ::Time::Location | Nil = nil) : ::Time
- .parse?(value : String, location : ::Time::Location | Nil = nil) : ::Time | Nil
- .utc(*args, **options) : ::Time
Class Method Detail
def self.parse(year : Int32, month : Int32, day : Int32, hour : Int32 = 0, minute : Int32 = 0, second : Int32 = 0, *args, **opts)
#
def self.parse?(value : String, location : ::Time::Location | Nil = nil) : ::Time | Nil
#