hodatime
Copyright(C) 2017 Jason Johnson
LicenseBSD-style (see the file LICENSE)
MaintainerJason Johnson <jason.johnson.081@gmail.com>
Stabilityexperimental
PortabilityPOSIX, Windows
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.HodaTime.Pattern.OffsetDateTime

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

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.