fix: tests with fixed year

This commit is contained in:
2021-04-06 14:23:19 +02:00
parent df1f906847
commit d377b0d1b8
+3
View File
@@ -127,6 +127,9 @@ func Test_parse(t *testing.T) {
func date(str string) LocalDate { func date(str string) LocalDate {
t, _ := time.ParseInLocation("2006-01-02", str, time.Now().Location()) t, _ := time.ParseInLocation("2006-01-02", str, time.Now().Location())
if t.Year() == 2020 {
t = time.Date(time.Now().Year(), t.Month(), t.Day(), 0, 0, 0, 0, t.Location())
}
return LocalDate(t) return LocalDate(t)
} }