v0.0.463 Fix SubtractYears
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 3m29s

This commit is contained in:
2024-05-29 20:20:01 +02:00
parent 62980e1489
commit d2c04afcd5
5 changed files with 168 additions and 6 deletions

View File

@@ -156,7 +156,7 @@ func SubtractYears(t time.Time, yearCount float64, tz *time.Location) time.Time
intCount, floatCount := math.Modf(yearCount)
t.AddDate(-int(intCount), 0, 0)
t = t.AddDate(-int(intCount), 0, 0)
t0 := TimeToYearStart(t, tz)
t1 := TimeToYearEnd(t, tz)
@@ -173,7 +173,7 @@ func AddYears(t time.Time, yearCount float64, tz *time.Location) time.Time {
intCount, floatCount := math.Modf(yearCount)
t.AddDate(int(intCount), 0, 0)
t = t.AddDate(int(intCount), 0, 0)
t0 := TimeToYearStart(t, tz)
t1 := TimeToYearEnd(t, tz)