Skip to content

Use ru{} in favor of rs{} where it makes sense - #873

Merged
HowardHinnant merged 1 commit into
HowardHinnant:masterfrom
DavisVaughan:feature/ru-over-rs
Mar 11, 2025
Merged

HowardHinnant merged 1 commit into
HowardHinnant:masterfrom
DavisVaughan:feature/ru-over-rs

Conversation

@DavisVaughan

@DavisVaughan DavisVaughan commented Mar 11, 2025 •

Copy link
Copy Markdown
Contributor

Closes #872

I've swapped out rs for ru everywhere I mentioned in #872 except for in %C where apparently century can be meaningfully negative. (Normally I'd wait for you to comment before doing a PR but it seemed like a POC was an easier way to see if I was missing anything with my idea)

I also went ahead and added some extra tests related to this. The majority of the new tests would not have passed before this change (meaning they would have previously performed a successful parse in some weird cases).

The test for a negative year in %c failing is dependent on the decision of #871, but reflects the current state of things.

@HowardHinnant
HowardHinnant merged commit 32ecb2a into HowardHinnant:master Mar 11, 2025
@HowardHinnant

Copy link
Copy Markdown
Owner

Thanks, nice job!

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.

Usage of rs{} vs ru{}

2 participants