1 Commits
0.5.1 ... 0.5.2

2 changed files with 5 additions and 12 deletions

View File

@ -14,15 +14,9 @@ proc format*(ti: TimeInterval, fmt: string): string =
let info = (zeroTime + ti).utc
return info.format(fmt)
# Will be deprecated in Nim 0.18.1 as it will exist in the standard times module.
proc `-`*(a, b: DateTime): Duration {.deprecated} =
return times.`-`(a,b)
proc `<`*(a, b: DateTime): bool {.deprecated} =
return times.`<`(a,b)
proc `<=`*(a, b: DateTime): bool {.deprecated} =
return times.`<=`(a,b)
proc format*(d: Duration, fmt: string): string =
let info = (fromUnix(0) + d).utc
return info.format(fmt)
proc `<`*(a, b: TimeInterval): bool =
return (zeroTime + a) < (zeroTime + b)

View File

@ -1,11 +1,10 @@
# Package
version = "0.5.1"
version = "0.5.2"
author = "Jonathan Bernard"
description = "Utility methods to fill in the lacking time support in Nim\'s stdlib."
license = "BSD3"
# Dependencies
requires "nim >= 0.19.0"
requires "nim >= 1.0.0"