Safe Haskell | None |
---|---|
Language | Haskell2010 |
- now :: IO Time
- today :: IO Day
- tomorrow :: IO Day
- yesterday :: IO Day
- epoch :: Time
- datetimeFromYmdhms :: Int -> Int -> Int -> Int -> Int -> Int -> Datetime
- timeFromYmdhms :: Int -> Int -> Int -> Int -> Int -> Int -> Time
- timeToDatetime :: Time -> Datetime
- datetimeToTime :: Datetime -> Time
- timeToOffsetDatetime :: Offset -> Time -> OffsetDatetime
- offsetDatetimeToTime :: OffsetDatetime -> Time
- timeToDayTruncate :: Time -> Day
- dayToTimeMidnight :: Day -> Time
- dayToDate :: Day -> Date
- dateToDay :: Date -> Day
- second :: Timespan
- minute :: Timespan
- hour :: Timespan
- day :: Timespan
- week :: Timespan
- buildDayOfWeekMatch :: a -> a -> a -> a -> a -> a -> a -> DayOfWeekMatch a
- buildMonthMatch :: a -> a -> a -> a -> a -> a -> a -> a -> a -> a -> a -> a -> MonthMatch a
- caseMonth :: MonthMatch a -> Month -> a
- w3c :: DatetimeFormat
- slash :: DatetimeFormat
- hyphen :: DatetimeFormat
- compact :: DatetimeFormat
- january :: Month
- february :: Month
- march :: Month
- april :: Month
- may :: Month
- june :: Month
- july :: Month
- august :: Month
- september :: Month
- october :: Month
- november :: Month
- december :: Month
- sunday :: DayOfWeek
- monday :: DayOfWeek
- tuesday :: DayOfWeek
- wednesday :: DayOfWeek
- thursday :: DayOfWeek
- friday :: DayOfWeek
- saturday :: DayOfWeek
- builder_Ymd :: Maybe Char -> Date -> Builder
- builder_Dmy :: Maybe Char -> Date -> Builder
- builder_HMS :: SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder
- parser_Ymd :: Maybe Char -> Parser Date
- parser_Mdy :: Maybe Char -> Parser Date
- parser_Dmy :: Maybe Char -> Parser Date
- builderUtf8_Ymd :: Maybe Char -> Date -> Builder
- parserUtf8_Ymd :: Maybe Char -> Parser Date
- builder_IMS_p :: MeridiemLocale Text -> SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder
- builder_IMSp :: MeridiemLocale Text -> SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder
- parser_HMS :: Maybe Char -> Parser TimeOfDay
- parser_HMS_opt_S :: Maybe Char -> Parser TimeOfDay
- builderUtf8_HMS :: SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder
- builderUtf8_IMS_p :: MeridiemLocale ByteString -> SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder
- builderUtf8_IMSp :: MeridiemLocale ByteString -> SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder
- parserUtf8_HMS :: Maybe Char -> Parser TimeOfDay
- parserUtf8_HMS_opt_S :: Maybe Char -> Parser TimeOfDay
- builder_DmyHMS :: SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder
- builder_DmyIMSp :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder
- builder_DmyIMS_p :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder
- builder_YmdHMS :: SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder
- builder_YmdIMSp :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder
- builder_YmdIMS_p :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder
- builderW3C :: Datetime -> Builder
- encode_DmyHMS :: SubsecondPrecision -> DatetimeFormat -> Datetime -> Text
- encode_DmyIMS_p :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Text
- encode_YmdHMS :: SubsecondPrecision -> DatetimeFormat -> Datetime -> Text
- encode_YmdIMS_p :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Text
- parser_DmyHMS :: DatetimeFormat -> Parser Datetime
- parser_YmdHMS :: DatetimeFormat -> Parser Datetime
- parser_YmdHMS_opt_S :: DatetimeFormat -> Parser Datetime
- parser_DmyHMS_opt_S :: DatetimeFormat -> Parser Datetime
- decode_DmyHMS :: DatetimeFormat -> Text -> Maybe Datetime
- decode_YmdHMS :: DatetimeFormat -> Text -> Maybe Datetime
- decode_YmdHMS_opt_S :: DatetimeFormat -> Text -> Maybe Datetime
- decode_DmyHMS_opt_S :: DatetimeFormat -> Text -> Maybe Datetime
- encodeUtf8_YmdHMS :: SubsecondPrecision -> DatetimeFormat -> Datetime -> ByteString
- encodeUtf8_YmdIMS_p :: MeridiemLocale ByteString -> SubsecondPrecision -> DatetimeFormat -> Datetime -> ByteString
- builderUtf8_YmdHMS :: SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder
- builderUtf8_YmdIMSp :: MeridiemLocale ByteString -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder
- builderUtf8_YmdIMS_p :: MeridiemLocale ByteString -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder
- builderUtf8W3C :: Datetime -> Builder
- decodeUtf8_YmdHMS :: DatetimeFormat -> ByteString -> Maybe Datetime
- decodeUtf8_YmdHMS_opt_S :: DatetimeFormat -> ByteString -> Maybe Datetime
- parserUtf8_YmdHMS :: DatetimeFormat -> Parser Datetime
- parserUtf8_YmdHMS_opt_S :: DatetimeFormat -> Parser Datetime
- encode_YmdHMSz :: OffsetFormat -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Text
- encode_DmyHMSz :: OffsetFormat -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Text
- builder_YmdHMSz :: OffsetFormat -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Builder
- builder_DmyHMSz :: OffsetFormat -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Builder
- parser_YmdHMSz :: OffsetFormat -> DatetimeFormat -> Parser OffsetDatetime
- parser_DmyHMSz :: OffsetFormat -> DatetimeFormat -> Parser OffsetDatetime
- builder_YmdIMS_p_z :: OffsetFormat -> MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Builder
- builder_DmyIMS_p_z :: OffsetFormat -> MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Builder
- builderW3Cz :: OffsetDatetime -> Builder
- builderUtf8_YmdHMSz :: OffsetFormat -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Builder
- parserUtf8_YmdHMSz :: OffsetFormat -> DatetimeFormat -> Parser OffsetDatetime
- builderUtf8_YmdIMS_p_z :: OffsetFormat -> MeridiemLocale ByteString -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Builder
- builderUtf8W3Cz :: OffsetDatetime -> Builder
Functions
Current
Construction
datetimeFromYmdhms :: Int -> Int -> Int -> Int -> Int -> Int -> Datetime Source #
Construct a Datetime
from year, month, day, hour, minute, second:
>>>
datetimeFromYmdhms 2014 2 26 17 58 52
foobar
Conversion
timeToOffsetDatetime :: Offset -> Time -> OffsetDatetime Source #
Convert Time
to OffsetDatetime
by providing an Offset
.
offsetDatetimeToTime :: OffsetDatetime -> Time Source #
Convert OffsetDatetime
to Time
.
timeToDayTruncate :: Time -> Day Source #
Convert Time
to Day
. This function is lossy; consequently, it
does not roundtrip with dayToTimeMidnight
.
Build Timespan
Matching
buildDayOfWeekMatch :: a -> a -> a -> a -> a -> a -> a -> DayOfWeekMatch a Source #
buildMonthMatch :: a -> a -> a -> a -> a -> a -> a -> a -> a -> a -> a -> a -> MonthMatch a Source #
caseMonth :: MonthMatch a -> Month -> a Source #
Format
The formats provided is this module are language-agnostic. To find meridiem formats and month formats, look in a language-specific module.
w3c :: DatetimeFormat Source #
Months
Days of Week
Textual Conversion
Date
Text
builder_Ymd :: Maybe Char -> Date -> Builder Source #
This could be written much more efficiently since we know the
exact size the resulting Text
will be.
builder_HMS :: SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder Source #
UTF-8 ByteString
Time of Day
Text
builder_IMS_p :: MeridiemLocale Text -> SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder Source #
builder_IMSp :: MeridiemLocale Text -> SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder Source #
parser_HMS_opt_S :: Maybe Char -> Parser TimeOfDay Source #
Parses text that is formatted as either of the following:
%H:%M
%H:%M:%S
That is, the seconds and subseconds part is optional. If it is
not provided, it is assumed to be zero. This format shows up
in Google Chrome's datetime-local
inputs.
UTF-8 ByteString
builderUtf8_HMS :: SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder Source #
builderUtf8_IMS_p :: MeridiemLocale ByteString -> SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder Source #
builderUtf8_IMSp :: MeridiemLocale ByteString -> SubsecondPrecision -> Maybe Char -> TimeOfDay -> Builder Source #
parserUtf8_HMS_opt_S :: Maybe Char -> Parser TimeOfDay Source #
Parses text that is formatted as either of the following:
%H:%M
%H:%M:%S
That is, the seconds and subseconds part is optional. If it is
not provided, it is assumed to be zero. This format shows up
in Google Chrome's datetime-local
inputs.
Datetime
Text
builder_DmyHMS :: SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder Source #
builder_DmyIMSp :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder Source #
builder_DmyIMS_p :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder Source #
builder_YmdHMS :: SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder Source #
This could be written much more efficiently since we know the
exact size the resulting Text
will be.
builder_YmdIMSp :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder Source #
builder_YmdIMS_p :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder Source #
builderW3C :: Datetime -> Builder Source #
encode_DmyHMS :: SubsecondPrecision -> DatetimeFormat -> Datetime -> Text Source #
encode_DmyIMS_p :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Text Source #
encode_YmdHMS :: SubsecondPrecision -> DatetimeFormat -> Datetime -> Text Source #
encode_YmdIMS_p :: MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Text Source #
decode_DmyHMS :: DatetimeFormat -> Text -> Maybe Datetime Source #
decode_YmdHMS :: DatetimeFormat -> Text -> Maybe Datetime Source #
decode_YmdHMS_opt_S :: DatetimeFormat -> Text -> Maybe Datetime Source #
decode_DmyHMS_opt_S :: DatetimeFormat -> Text -> Maybe Datetime Source #
UTF-8 ByteString
encodeUtf8_YmdIMS_p :: MeridiemLocale ByteString -> SubsecondPrecision -> DatetimeFormat -> Datetime -> ByteString Source #
builderUtf8_YmdHMS :: SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder Source #
builderUtf8_YmdIMSp :: MeridiemLocale ByteString -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder Source #
builderUtf8_YmdIMS_p :: MeridiemLocale ByteString -> SubsecondPrecision -> DatetimeFormat -> Datetime -> Builder Source #
builderUtf8W3C :: Datetime -> Builder Source #
Offset Datetime
Text
encode_YmdHMSz :: OffsetFormat -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Text Source #
encode_DmyHMSz :: OffsetFormat -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Text Source #
builder_YmdHMSz :: OffsetFormat -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Builder Source #
builder_DmyHMSz :: OffsetFormat -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Builder Source #
builder_YmdIMS_p_z :: OffsetFormat -> MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Builder Source #
builder_DmyIMS_p_z :: OffsetFormat -> MeridiemLocale Text -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Builder Source #
builderW3Cz :: OffsetDatetime -> Builder Source #
UTF-8 ByteString
builderUtf8_YmdHMSz :: OffsetFormat -> SubsecondPrecision -> DatetimeFormat -> OffsetDatetime -> Builder Source #