feat(card): configurable start of week (#25)

* feat(card): configurable start of week for heatmap + weekday cards

New -start-of-week CLI flag (and start_of_week action input) rotates the
contribution-heatmap rows and the productive-weekday bars so users whose
calendars start on Monday (or any other day) get matching output. Default
stays Sunday to preserve existing renders.

* docs: note start-of-week in design-guidelines, codebase-summary, deployment-guide

- design-guidelines: heatmap row order + productive-weekday bar order now derive from Profile.WeekStart
- codebase-summary: list new weekday_start_test.go cases + TestParseWeekday
- deployment-guide: mention start_of_week as an optional action input in the workflow template
This commit is contained in:
2026-04-21 20:57:21 +07:00
committed by GitHub
parent e8d9cc5900
commit 92387eddf5
13 changed files with 308 additions and 24 deletions
+7
View File
@@ -83,6 +83,13 @@ type Profile struct {
// display on time-based cards (e.g. "UTC+7.00" for Asia/Saigon). Filled
// by the CLI after loading -tz.
UTCOffsetLabel string
// WeekStart is the weekday used as row 0 on the heatmap and the first
// bar on the productive-weekday chart. Defaults to time.Sunday to match
// GitHub's own contribution calendar; -start-of-week on the CLI can flip
// it to time.Monday (or any other weekday) without touching the data —
// only the presentation order changes.
WeekStart time.Weekday
}
// DailyContribution is a single day in the contributions calendar.