hs-hourglass
hs-hourglass copied to clipboard
efficient and simpler time API for haskell
Right now, there's no built-in way to format a `TimeInterval`. I'm writing something that checks how long it has been since something was last done. Ideally, I'd like to pass...
I'm finding that Hourglass's `timezoneCurrent` function is returning a wildly incorrect value on my Raspberry Pi, even though the `date` command-line program correctly determines that the time zone is Pacific...
It would be great if it were possible to parse optional fields in `TimeFormat` instances. For example, RFC3339-nano includes an optional nanoseconds component.
According to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601#Times) specification, it is possible to represent fractions of a second (or the smallest represented unit) using a decimal sign (either period or comma...). This is not taken...
For example, ``` > let f = (ElapsedP (Elapsed (Seconds 1367411052 ))) (NanoSeconds 258801000) > f 1367411052s.258801000ns > f `timeAdd` (NanoSeconds 1) 1367411052s.258801000ns ``` The reason being that the `toSeconds`...
It seems that newtypes such as `Seconds` need rewrite rules in order for `fromIntegral` to work efficiently. Perhaps something inspired by these general rules for `Int64` from [GHC.Int](http://hackage.haskell.org/package/base-4.8.2.0/docs/src/GHC.Int.html): ``` haskell...
Fixes #23 Should I change something in this PR? Please tell me, because I'm not very familiar with pull requests and GitHub
Nanoseconds is to the right of the decimal, and so needs to be zero padded if represenations like `532s.23456789ns` are to make sense; needs to be `532s.023456789ns`. So pad to...