1747 add ns to duration (#2128)

* Added nanos to Duration

* Removed unwraps

* Added nanos to Duration

* Removed unwraps

* Fixed errors

* Removed unwraps

* Changed serialization to String

* Fixed Date and Duration comparison
This commit is contained in:
Pierre-André Gagnon
2020-07-10 13:48:11 -04:00
committed by GitHub
parent 6a89b1b010
commit e07a9e4ee7
18 changed files with 263 additions and 98 deletions

View File

@ -311,6 +311,9 @@ fn parse_unit(lite_arg: &Spanned<String>) -> (SpannedExpression, Option<ParseErr
(Unit::Gigabyte, vec!["gb", "GB", "Gb", "gB"]),
(Unit::Terabyte, vec!["tb", "TB", "Tb", "tB"]),
(Unit::Petabyte, vec!["pb", "PB", "Pb", "pB"]),
(Unit::Nanosecond, vec!["ns"]),
(Unit::Microsecond, vec!["us"]),
(Unit::Millisecond, vec!["ms"]),
(Unit::Second, vec!["s"]),
(Unit::Minute, vec!["m"]),
(Unit::Hour, vec!["h"]),