Fix time format

This commit is contained in:
Senad Uka
2022-02-16 19:16:33 +01:00
parent ba918d1f57
commit 651e1b4933
3 changed files with 2 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ func ArticlesForDay(store *Store, day time.Time) (articles []model.DisplayArticl
r.FormatedCreatedAt = fmt.Sprintf("Prije %d minuta.", int(math.Floor(ago.Minutes())))
} else if hours > 24 {
r.FormatedCreatedAt = r.CreatedAt.Format("01.02.2006. 15:04:05")
r.FormatedCreatedAt = r.CreatedAt.Format("02.01.2006. 15:04:05")
} else {
r.FormatedCreatedAt = fmt.Sprintf("Prije %d sati.", int(math.Floor(hours)))
}
@@ -123,7 +123,7 @@ func ArticleByID(store *Store, ID int, slug string) (article model.DisplayArticl
r.FormatedCreatedAt = fmt.Sprintf("Prije %d minuta.", int(math.Floor(ago.Minutes())))
} else if hours > 24 {
r.FormatedCreatedAt = r.CreatedAt.Format("01.02.2006. 15:04:05")
r.FormatedCreatedAt = r.CreatedAt.Format("02.01.2006. 15:04:05")
} else {
r.FormatedCreatedAt = fmt.Sprintf("Prije %d sati.", int(math.Floor(hours)))
}

BIN
server

Binary file not shown.

BIN
spider

Binary file not shown.