fix comments duration

This commit is contained in:
deepzz0
2018-05-07 20:45:37 +08:00
parent 01b7643ca5
commit f016b28cb6
2 changed files with 14 additions and 8 deletions

View File

@@ -125,7 +125,7 @@ func ConvertStr(str string) string {
} else if h := d*24 + h2 - h1; h > 1 || (h == 1 && mi2-mi1 >= 0) {
return fmt.Sprintf(HOURS_AGO, h)
} else if mi := h*60 + mi2 - mi1; mi > 1 || (mi == 1 && s2-s1 >= 0) {
return fmt.Sprintf(MINUTES_AGO, m)
return fmt.Sprintf(MINUTES_AGO, mi)
}
return JUST_NOW
}