fixed some migration issues and added generics for update and insert

This commit is contained in:
2026-02-09 21:58:50 +11:00
parent 292ec93de7
commit bb52790faa
19 changed files with 591 additions and 261 deletions

View File

@@ -144,10 +144,8 @@ func formatDateLong(t time.Time) string {
}
func formatDuration(start, end time.Time) string {
days := int(end.Sub(start).Hours() / 24)
if days == 0 {
return "1 day"
} else if days == 1 {
days := int(end.Sub(start).Hours()/24) + 1
if days == 1 {
return "1 day"
} else if days < 7 {
return strconv.Itoa(days) + " days"