Ensmallen Time struct.

This commit is contained in:
Jeroen van Rijn
2024-03-20 18:09:07 +01:00
parent 9c144dd24f
commit 89ca15014c
3 changed files with 15 additions and 16 deletions
+2 -2
View File
@@ -172,7 +172,7 @@ date_component_roundtrip_test :: proc(t: ^testing.T, moment: dt.DateTime) {
expected := fmt.tprintf("Expected %4d-%2d-%2d %2d:%2d:%2d, got %4d-%2d-%2d %2d:%2d:%2d",
moment.year, moment.month, moment.day, moment.hour, moment.minute, moment.second, YYYY, MM, DD, hh, mm, ss)
ok = moment.year == i64(YYYY) && moment.month == i64(MM) && moment.day == i64(DD)
ok &= moment.hour == i64(hh) && moment.minute == i64(mm) && moment.second == i64(ss)
ok = moment.year == i64(YYYY) && moment.month == i64(MM) && moment.day == i64(DD)
ok &= moment.hour == i8(hh) && moment.minute == i8(mm) && moment.second == i8(ss)
expect(t, ok, expected)
}