Make Time work with std/strformat (#21409)

* Add test case

* Remove formatValue template for `Time`

It didn't handle empty specifier correctly which caused it to be blank with strformat
This commit is contained in:
Jake Leahy 2023-02-21 22:04:27 +11:00 • committed by GitHub
commit 6d423f1856
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

5
tests/stdlib/t21406.nim Normal file
View file

@ -0,0 +1,5 @@
import std/[times, strformat]
import std/assertions
doAssert fmt"{getTime()}" == $getTime()
doAssert fmt"{now()}" == $now()