hs-hourglass icon indicating copy to clipboard operation
hs-hourglass copied to clipboard

efficient and simpler time API for haskell

Results 19 hs-hourglass issues
Sort by recently updated
recently updated
newest added

Hi, subj: ``` Preprocessing library for hourglass-0.2.12.. Building library for hourglass-0.2.12.. [ 1 of 17] Compiling Data.Hourglass.Utils ( Data/Hourglass/Utils.hs, dist/build/Data/Hourglass/Utils.o, dist/build/Data/Hourglass/Utils.dyn_o ) [ 2 of 17] Compiling Data.Hourglass.Zone ( Data/Hourglass/Zone.hs,...

Hello, On debian x32 architecture, haskell-hourglass FTBFS with the following error: ``` hourglass conversion calendar: FAIL (0.10s) *** Failed! (after 61 tests): Exception: expected: 189203562893958s got: -181881611480442s CallStack (from HasCallStack):...

When trying to print a `DateTime` before Janurary 1, 1601 as follows: ```Haskell timePrint ISO8601_DateAndTime (DateTime (Date 1600 December 31) (TimeOfDay 23 59 59 999_999_999)) ``` The following exception is...

For example: ```hs rationalToElapsedP :: Rational -> ElapsedP rationalToElapsedP secondsFrac = let (sec, nanoSec) = properFraction secondsFrac in ElapsedP (Elapsed (Seconds sec)) (NanoSeconds $ truncate $ nanoSec * 1e9) ```

```hs fmap (timePrint "YYYY-DDD H:MI") timeCurrentP ``` yields ```txt 2020-15D 19:00 ``` but should yield ```txt 2020-075 19:00 ```

This works: ```hs timeParse (toFormat "EPOCH ms") "1536080415 123" -- Just (DateTime { -- dtDate = Date {dateYear = 2018, dateMonth = September, dateDay = 4}, -- dtTime = TimeOfDay...

This fixes cabal warning: > These modules are needed for compilation but not listed in your .cabal file's other-modules: TimeDB The version number in master seems to not match the...

The first commit makes the examples work. The second shows what I believe to be more idiomatic use of `time` for these examples.

Without glancing at the tests, I would have no idea how the String must look like. (e.g. `timeParse (toFormat "YYYY-MM-DDTH:MI:S.msusns") "2015-11-21T17:25"`

Is there a particular reason for `NanoSeconds` type not to provide `Integral` instance?