This commit is contained in:
shoopea 2020-06-27 12:27:16 +02:00
parent 7f62e51971
commit c326cb5184

View File

@ -74,7 +74,11 @@ func fromChatWarsDate(d string) (t time.Time, err error) {
minute, _ := strconv.Atoi(r.ReplaceAllString(d, "${Minute}")) minute, _ := strconv.Atoi(r.ReplaceAllString(d, "${Minute}"))
days := int(0) days := int(0)
for i := 1059; i < year; i++ { for i := 1059; i < year; i++ {
days = days + 365 if i%4 == 0 {
days += 365
} else {
days += 365
}
} }
for i := 1; i < chatWarsMonth[r.ReplaceAllString(d, "${Month}")]; i++ { for i := 1; i < chatWarsMonth[r.ReplaceAllString(d, "${Month}")]; i++ {
if _, special := chatWarsDaysSpecial[year][i]; special { if _, special := chatWarsDaysSpecial[year][i]; special {