Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abbreviate week naming for weekly reports #2204

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

victormihalache
Copy link
Contributor

This PR changes how the week name is displayed in the column header by shortening it for all reports, and omitting the year if all column are within the same year.

We rename showPeriodMonthAbbrev to showPeriodAbbrev as it's now used for weeks too, so not strictly just months.

It adds the following method

showPeriodAbbrev (WeekPeriod b) = T.pack $ formatTime defaultTimeLocale "W%V" b

and changes the multi-year naming:

- showPeriod (WeekPeriod b) = T.pack $ formatTime defaultTimeLocale "%FW%V" b
+ showPeriod (WeekPeriod b) = T.pack $ formatTime defaultTimeLocale "%0Y-W%V" b

@simonmichael simonmichael merged commit 60efd03 into simonmichael:master Jun 14, 2024
1 check passed
simonmichael added a commit that referenced this pull request Jun 25, 2024
Unfortunately our ci workflow does not reliably detect commit messages
with PRs, and in this case it wrongly identified the commit as a
harmless doc change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants