fixed some migration issues and added generics for update and insert
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user