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

doc: Fix typos in rd_to_weekday documentation. #45

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ pub const fn date_to_rd((y, m, d): (i32, u8, u8)) -> i32 {
/// > January 1st, 1970 was a Thursday). However, it uses a faster way to
/// > evaluate `m % 7 + 1` based on the binary representation of the reciprocal
/// > of `7`, namely, `C := (0.001_001_001...)_2`. The following table presents
/// > the binary values of `m % 7 + 1` and `p := m * C` for `m = 0`, `2`, `...`:
/// > the binary values of `m % 7 + 1` and `p := (m + 1) * C` for `m = 0`, `2`,
/// `...`:
/// >
/// > | `m` | `m % 7 + 1` | `(m + 1) * C` |
/// > | --- | ----------- | ---------------------- |
Expand All @@ -454,7 +455,7 @@ pub const fn date_to_rd((y, m, d): (i32, u8, u8)) -> i32 {
/// > | `7` | `(001)_2` | `(1.001_001_001...)_2` |
/// > | ... | ... | ... |
/// >
/// > Notice that the bits of `m * C` after the dot repeat indefinitely in
/// > Notice that the bits of `(m + 1) * C` after the dot repeat indefinitely in
/// > groups of `3`. Furthermore, the repeating group matches `m % 7 + 1`.
/// >
/// > Based on the above, the algorithm multiplies `m` by `2^64 / 7` and
Expand Down
Loading