Copyright | (c) 2011 Hugo Daniel Gomes |
---|---|
License | BSD-style |
Maintainer | mr.hugo.gomes@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Support for reading and displaying time in the format specified by the RFC3339 http://www.ietf.org/rfc/rfc3339.txt
Example of usage:
import Data.Time.LocalTime showTime :: IO Text showTime = formatTimeRFC3339 <$> getZonedTime example1 = "1985-04-12T23:20:50.52Z" example2 = "1996-12-19T16:39:57-08:00" example3 = "1990-12-31T23:59:60Z" example4 = "1990-12-31T15:59:60-08:00" example5 = "1937-01-01T12:00:27.87+00:20" examples = [example1,example2,example3,example4,example5] readAll = map parseTimeRFC3339 examples
Synopsis
- formatTimeRFC3339 :: TextualMonoid t => ZonedTime -> t
- formatDateRFC3339 :: (TextualMonoid t, FormatTime time) => time -> t
- parseTimeRFC3339 :: TextualMonoid t => t -> Maybe ZonedTime
- parseDateRFC3339 :: TextualMonoid t => t -> Maybe Day
Basic type class
formatTimeRFC3339 :: TextualMonoid t => ZonedTime -> t Source #
formatDateRFC3339 :: (TextualMonoid t, FormatTime time) => time -> t Source #
parseTimeRFC3339 :: TextualMonoid t => t -> Maybe ZonedTime Source #
parseDateRFC3339 :: TextualMonoid t => t -> Maybe Day Source #