Skip to content

Conversation

@RenjiSann
Copy link
Collaborator

This PR adds support for locale-aware month-sorting.

Note: There is a known discrepancy between icu and GNU locale regarding the french abbreviated month name of april in french (avril vs avr.). There is a patch in build-gnu.sh to account for this

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)


match response.payload.get() {
MonthNames::Linear(months) => Some(months.iter().map(ToString::to_string).collect()),
_ => todo!("unsupported"),
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a comment detailing what should happen here

}

pub fn locale_abbr_month_names() -> Option<&'static [String]> {
static DECIMAL_SEP: OnceLock<Option<Vec<String>>> = OnceLock::new();
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry but what means DECIMAL_SEP in this context?

# to the abbreviated month of april in the French locale:
# GNU is 'avril'
# ICU is 'avr.'
# sed -i -e 's|\(LC_ALL=$LOC locale abmon 2>/dev/null\)|\1 \| sed s/avril/avr./|' tests/sort/sort-month.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

why commented ?

@sylvestre
Copy link
Contributor

@RenjiSann do you have an update on this ? merci :)

@RenjiSann
Copy link
Collaborator Author

@RenjiSann do you have an update on this ? merci :)

Hi, I don't have much time recently to work on it. And I probably won't have the time for another few weeks or so.
Also, I'm not really convinced by my implementation, I might refactor it

Anyway, if someone wants to keep on going with this before I can finish, feel free to do so :)

@sylvestre
Copy link
Contributor

please reopen when ready! :)

@sylvestre sylvestre closed this Dec 5, 2025
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