Switch all user-facing time displays to 12-hour MM-DD-YYYY format

Consistently format dates and times across all templates and API
handlers using MM-DD-YYYY with 12-hour clock (03:04 PM):

- analytics.go: date keys, lastSync, lastRead timestamps
- progress.go: lastUpdated timestamp in GetAllProgress
- book_detail.templ: LastReadAt, DatePublished
- book_detail_modals.templ: progress sync timestamps, LastReadAt
- devices.templ: LastSync, LastSeen
- conflicts.templ: CreatedAt
- admin_users.templ: user CreatedAt date
This commit is contained in:
2026-04-27 21:31:19 -04:00
parent f589bedad5
commit e5726e12be
12 changed files with 33 additions and 33 deletions
+3 -3
View File
@@ -229,7 +229,7 @@ templ BookDetail(user User, book handlers.MediaDetail, errorMessage string) {
<div class="w-full rounded-full h-3" style="background-color: var(--bg-primary);">
<div
class="h-3 rounded-full transition-all"
style={ fmt.Sprintf("width: %.1f%%; background-color: var(--accent);", book.ReadingProgress.Percentage.Float64 * 100) }
style={ fmt.Sprintf("width: %.1f%%; background-color: var(--accent);", book.ReadingProgress.Percentage.Float64*100) }
></div>
</div>
</div>
@@ -250,7 +250,7 @@ templ BookDetail(user User, book handlers.MediaDetail, errorMessage string) {
if book.ReadingProgress.LastReadAt.Valid {
<div>
<p style="color: var(--text-secondary)">Last Read</p>
<p>{ book.ReadingProgress.LastReadAt.Time.Format("2006-01-02 15:04") }</p>
<p>{ book.ReadingProgress.LastReadAt.Time.Format("01-02-2006 03:04 PM") }</p>
</div>
}
if book.ReadingProgress.LastSyncSource.Valid {
@@ -279,7 +279,7 @@ templ BookDetail(user User, book handlers.MediaDetail, errorMessage string) {
if book.DatePublished.Valid {
<div>
<p style="color: var(--text-secondary)">Published</p>
<p>{ book.DatePublished.Time.Format("2006-01-02") }</p>
<p>{ book.DatePublished.Time.Format("01-02-2006") }</p>
</div>
}
if book.Isbn.Valid && book.Isbn.String != "" {