vt-utils-1.3.0.0: Vector and Text utilities

Safe HaskellSafe
LanguageHaskell2010

VtUtils.Date

Description

Date format utilities

Synopsis

Documentation

dateFormat :: Text -> UTCTime -> Text Source #

Formats a date into a Text string using specified formatting string

Arguments:

Return value: String containing a date in a specified format

dateFormatISO8601 :: UTCTime -> Text Source #

Formats a date into a Text string using ISO8601 formatting string

Format: %Y-%m-%d %H:%M:%S

Output example: 2018-11-25 00:00:01

Arguments:

  • date :: UTCTime: Date to format

Return value: String containing a date in ISO8601 format

data DateParseISO8601Error Source #

Error record for dateParseISO8601 function

Constructors

DateParseISO8601Error 

Fields

dateParseISO8601 :: Text -> Either DateParseISO8601Error UTCTime Source #

Parses Text string using ISO8601 format

Expected input example: 2018-11-25 00:00:01

Arguments:

  • text :: Text: Text string containing a date in ISO8601 format

Return value: Parsed date or error message