summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikitaVolkov <>2017-04-23 16:03:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-04-23 16:03:00 (GMT)
commitc92b2aa64fab89db340935f7445511165583cbcb (patch)
treee368c98e83334cef61255a9777f9c45cf94e1afe
parent79c11139a220cf3f1cac9d66d7628013a24f2075 (diff)
version 0.1.30.1.3
-rw-r--r--attoparsec-time.cabal2
-rw-r--r--library/Attoparsec/Time.hs7
2 files changed, 8 insertions, 1 deletions
diff --git a/attoparsec-time.cabal b/attoparsec-time.cabal
index 59e32c7..b364054 100644
--- a/attoparsec-time.cabal
+++ b/attoparsec-time.cabal
@@ -1,7 +1,7 @@
name:
attoparsec-time
version:
- 0.1.2.1
+ 0.1.3
synopsis:
Attoparsec parsers of time
description:
diff --git a/library/Attoparsec/Time.hs b/library/Attoparsec/Time.hs
index 00fd570..4edc055 100644
--- a/library/Attoparsec/Time.hs
+++ b/library/Attoparsec/Time.hs
@@ -230,6 +230,9 @@ Right 0.01s
>>> parseOnly diffTime "10μs"
Right 0.00001s
+>>> parseOnly nominalDiffTime "10us"
+Right 0.00001s
+
>>> parseOnly diffTime "10ns"
Right 0.00000001s
@@ -284,6 +287,9 @@ Right 0.01s
>>> parseOnly nominalDiffTime "10μs"
Right 0.00001s
+>>> parseOnly nominalDiffTime "10us"
+Right 0.00001s
+
>>> parseOnly nominalDiffTime "10ns"
Right 0.00000001s
@@ -317,6 +323,7 @@ timeUnitFactor =
"s" -> return id
"ms" -> return (/ 1000)
"μs" -> return (/ 1000000)
+ "us" -> return (/ 1000000)
"ns" -> return (/ 1000000000)
"ps" -> return (/ 1000000000000)
"m" -> return (* 60)