New implementations of times.parse & times.format (#8094)

This commit is contained in:
Oscar Nihlgård 2018-07-09 20:04:25 +02:00 • committed by Andreas Rumpf
commit 3b310e91cd
4 changed files with 975 additions and 619 deletions

View file

@ -683,8 +683,8 @@ when isMainModule:
# works:
import times
var nullTime: DateTime
check &"{nullTime:yyyy-mm-dd}", "0000-00-00"
var dt = initDateTime(01, mJan, 2000, 00, 00, 00)
check &"{dt:yyyy-MM-dd}", "2000-01-01"
var tm = fromUnix(0)
discard &"{tm}"