Roadmap #5: Day of week in single-day headings #105
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Single-day pages (day view, snapshot album) show the date in YYYY-MM-DD format only. Adding the day of the week makes these headings more human-readable and easier to navigate — especially when reviewing footage from a specific remembered day such as 'the Thursday before last'.
Plan of attack
Computed
weekdayfrom the ISO date string usingdatetime.strptime(day, '%Y-%m-%d').strftime('%A')and passed it into template context.Key files:
src/cang/web/routes/clips.py—day_viewnow passesweekdayto the templatesrc/cang/web/routes/snapshots.py—snapshot_albumandclip_snapshot_albumboth passweekdaysrc/cang/web/templates/day.html— h1 changed to{{ weekday }} · {{ day }}src/cang/web/templates/snapshots.html— back-link changed to← {{ weekday }} · {{ day }}