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

Fix ISOWeekDate::weekday doc and examples #196

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

35VLG84
Copy link

@35VLG84 35VLG84 commented Jan 10, 2025

As ISO-Week is Monday == day 1 based system, it would be nice to give correct example to readers in this context.
So instead of Weekday::to_sunday_zero_offset use Weekday::to_monday_one_offset in doc and examples.

Add an assert test into the example code to highlight above.

As ISO-Week is Monday == day 1 based system,
it would be nice to give correct example to readers in this
context. So instead of `Weekday::to_sunday_zero_offset`
use `Weekday::to_monday_one_offset` in doc and examples.

Add an assert test into the example code to highlight above.

Signed-off-by: 35V LG84 <[email protected]>
Copy link
Owner

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some nits.

You can ignore the wasm CI failure (sigh).

src/civil/iso_week_date.rs Show resolved Hide resolved
src/civil/iso_week_date.rs Show resolved Hide resolved
Add `Weekday::to_sunday_zero_offset` into
`ISOWeekDate::weekday` doc example tests.

Signed-off-by: 35V LG84 <[email protected]>
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.

2 participants