Get the current time, in the local timezone.
To obtain the current time in a specific timezone, use DateTime.now or DateTime.nowAt.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Get the current date, in the local timezone.
Instances For
Get the current time, in the local timezone.
Instances For
Gets the current DateTime.
Equations
- Std.Time.DateTime.now = do let tm ← Std.Time.Timestamp.now let rules ← Std.Time.Database.defaultGetLocalZoneRules pure (Std.Time.DateTime.ofTimestamp tm rules)
Instances For
Gets the current DateTime using the identifier of a time zone.
Equations
- Std.Time.DateTime.nowAt id = do let tm ← Std.Time.Timestamp.now let rules ← Std.Time.Database.defaultGetZoneRules id pure (Std.Time.DateTime.ofTimestamp tm rules)
Instances For
Converts a PlainDate to a DateTime.
Equations
Instances For
Converts a PlainDate to a DateTime using TimeZone.
Equations
Instances For
Converts a DateTime to a PlainDate
Equations
- dt.toPlainDate = dt.toPlainDateTime.date
Instances For
Converts a DateTime to a PlainTime
Equations
- dt.toPlainTime = dt.toPlainDateTime.time
Instances For
Creates a new DateTime out of a PlainDateTime and a time zone identifier.
Equations
- Std.Time.DateTime.of pdt id = do let zr ← Std.Time.Database.defaultGetZoneRules id pure (Std.Time.DateTime.ofPlainDateTime pdt zr)
Instances For
Converts a PlainDateTime to a Timestamp using the ZoneRules.
Equations
- pdt.toTimestamp zr = (Std.Time.DateTime.ofPlainDateTime pdt zr).toTimestamp
Instances For
Converts a PlainDateTime to a Timestamp using the TimeZone.
Equations
- pdt.toTimestampWithZone tz = (Std.Time.DateTime.ofPlainDateTimeWithZone pdt tz).toTimestamp
Instances For
Converts a PlainDate to a Timestamp using the ZoneRules.
Equations
- dt.toTimestamp zr = (Std.Time.DateTime.ofLocalDate dt zr).toTimestamp
Instances For
Converts a PlainDate to a Timestamp using the TimeZone.
Equations
- dt.toTimestampWithZone tz = (Std.Time.DateTime.ofLocalDateWithZone dt tz).toTimestamp