Fix time format
This commit is contained in:
@@ -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)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user