| 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.OffsetDateTime
Contents
Description
Patterns for an OffsetDateTime — a
CalendarDateTime pinned by a fixed UTC Offset — rendered as
yyyy-MM-ddTHH:mm:ss(+/-)HH:mm. Build your own with offsetDateTimePattern from a date-time pattern and an offset
pattern.
Synopsis
- pOffsetDateTime :: (IsCalendar cal, Enum (Month cal)) => Pattern (OffsetDateTime cal -> OffsetDateTime cal) (OffsetDateTime cal -> String) String
- offsetDateTimePattern :: IsCalendar cal => Pattern (CalendarDateTime cal -> CalendarDateTime cal) (CalendarDateTime cal -> String) String -> Pattern (Offset -> Offset) (Offset -> String) String -> Pattern (OffsetDateTime cal -> OffsetDateTime cal) (OffsetDateTime cal -> String) String
Standard Patterns
pOffsetDateTime :: (IsCalendar cal, Enum (Month cal)) => Pattern (OffsetDateTime cal -> OffsetDateTime cal) (OffsetDateTime cal -> String) String Source #
The ISO-8601 offset date/time pattern, yyyy-MM-ddTHH:mm:ss±HH:mm (e.g. 2024-04-23T09:00:00+02:00).
Custom Patterns
Build an OffsetDateTime pattern from a CalendarDateTime pattern and an Offset pattern.
offsetDateTimePattern :: IsCalendar cal => Pattern (CalendarDateTime cal -> CalendarDateTime cal) (CalendarDateTime cal -> String) String -> Pattern (Offset -> Offset) (Offset -> String) String -> Pattern (OffsetDateTime cal -> OffsetDateTime cal) (OffsetDateTime cal -> String) String Source #
Join a Gregorian-or-other CalendarDateTime pattern to an Offset pattern, producing an OffsetDateTime
pattern. The date/time text comes first, immediately followed by the offset text.