-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Let first calendar day always start on Monday #27
base: master
Are you sure you want to change the base?
Conversation
Shift first day of the month so that the first calendar day is always Monday. Otherwise, week days are not at a constant position month to month.
@@ -111,6 +111,21 @@ where | |||
}; | |||
|
|||
let draw_day = |printer: &Printer| { | |||
let offset = match NaiveDate::from_ymd_opt(year, month, 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably take into account that in some countries Sunday is the first day of the week, e.g. USA, Canada, Japan. Another thing could be making this offset optional.
Also, maybe calculating day offset deserves to be in a separate function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably take into account that in some countries Sunday is the first day of the week, e.g. USA, Canada, Japan. Another thing could be making this offset optional.
Yeah … pretty much what I wrote in the PR description.
This PR is looking really good, thank you for showing interest in I did have the dates offset originally, but I felt a certain disconnect with how With the offset in place, 1 line in |
That's true in a way but somehow up to now I did not see such strong connection between both modes. Hmm, one could make it configurable but that means more options which means more failure modes and complaints. No idea what to do now ;-) |
So currently week mode tabulates from whatever day of the month was the first? E.g. thursday to wednesday? That seems strange Would it be possible to do the offset and show the previous month's contribution, maybe with a different terminal background color? |
might be able to resolve with a configuration file and leave it up to the user #52 |
Is it possible to implement this as an option now that the configuration file has been merged? |
Shift first day of the month so that the first calendar day is always Monday. Otherwise, week days are not at a constant position month to month which is counter-intuitive to how normal calendars work.
Question is if the first day of the week should be configurable or (somehow) be fetched from the user's locale.