| Copyright | (C) 2017 Jason Johnson |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Jason Johnson <jason.johnson.081@gmail.com> |
| Stability | experimental |
| Portability | POSIX, Windows |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.HodaTime.Pattern.Instant
Contents
Description
Patterns for an Instant, rendered as ISO-8601 UTC (yyyy-MM-ddTHH:mm:ssZ); pInstantNano
additionally carries the fractional second down to the nanosecond.
Synopsis
- pInstant :: Pattern (Instant -> Instant) (Instant -> String) String
- pInstantNano :: Pattern (Instant -> Instant) (Instant -> String) String
- instantPattern :: Pattern (CalendarDateTime Gregorian -> CalendarDateTime Gregorian) (CalendarDateTime Gregorian -> String) String -> Pattern (Instant -> Instant) (Instant -> String) String
Standard Patterns
pInstant :: Pattern (Instant -> Instant) (Instant -> String) String Source #
The ISO-8601 UTC instant pattern, yyyy-MM-ddTHH:mm:ssZ (the trailing Z marks it as UTC).
pInstantNano :: Pattern (Instant -> Instant) (Instant -> String) String Source #
Like pInstant but carried down to the nanosecond, yyyy-MM-ddTHH:mm:ss.fffffffffZ.
Custom Patterns
Build an Instant pattern from any Gregorian CalendarDateTime pattern, treating the instant as UTC.
instantPattern :: Pattern (CalendarDateTime Gregorian -> CalendarDateTime Gregorian) (CalendarDateTime Gregorian -> String) String -> Pattern (Instant -> Instant) (Instant -> String) String Source #
Adapt a Gregorian CalendarDateTime pattern into an Instant pattern. The instant is treated as UTC: it is
projected to its unadjusted Gregorian CalendarDateTime for formatting, and the parsed CalendarDateTime is
taken back to an Instant without any offset.