remove reserved word

This commit is contained in:
Celogeek 2024-03-03 11:49:55 +01:00
parent 9e64227494
commit a9254b7977
Signed by: celogeek
SSH Key Fingerprint: SHA256:njNJLzoLQdbV9PC6ehcruRb0QnEgxABoCYZ+0+aUIYc

View File

@ -45,7 +45,7 @@ func (c TimeResult) toTime() time.Time {
} }
func (c TimeResult) AgeAt(createdAt *TimeResult) string { func (c TimeResult) AgeAt(createdAt *TimeResult) string {
var year, month, day, hour, min, sec int var year, month, day, hour, minutes, seconds int
a := c.toTime() a := c.toTime()
if a.IsZero() { if a.IsZero() {
return "" return ""
@ -67,20 +67,20 @@ func (c TimeResult) AgeAt(createdAt *TimeResult) string {
h1, m1, s1 := a.Clock() h1, m1, s1 := a.Clock()
h2, m2, s2 := b.Clock() h2, m2, s2 := b.Clock()
year = int(y2 - y1) year = y2 - y1
month = int(M2 - M1) month = int(M2 - M1)
day = int(d2 - d1) day = d2 - d1
hour = int(h2 - h1) hour = h2 - h1
min = int(m2 - m1) minutes = m2 - m1
sec = int(s2 - s1) seconds = s2 - s1
// Normalize negative values // Normalize negative values
if sec < 0 { if seconds < 0 {
sec += 60 seconds += 60
min-- minutes--
} }
if min < 0 { if minutes < 0 {
min += 60 minutes += 60
hour-- hour--
} }
if hour < 0 { if hour < 0 {