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

Change ordinalNumber formatting in IT locale #1617

Merged
merged 2 commits into from
Jan 10, 2022
Merged

Change ordinalNumber formatting in IT locale #1617

merged 2 commits into from
Jan 10, 2022

Conversation

davidspiess
Copy link
Contributor

This pull request removes the º symbol from the ordinalNumber formatting function since it's primarily used to indicate the first day of the month. But leaving it away completely is also considered correct and much more common.

Example:

formatDate(new Date(2020, 1, 14), "do MMMM y", itLocale)
// before 14º febbraio 2020
// after 14 febbraio 2020

More infos can be found here: https://en.wikipedia.org/wiki/Date_and_time_notation_in_Italy

Relevant section:

The expanded form is "22 dicembre 2010", optionally with the day of the week: "mercoledì 22 dicembre 2010".[1]

The first day of the month is usually written 1º dicembre or 1° dicembre; 1 dicembre is also considered correct. The other days of the month follow the usual cardinal form.

@tan75
Copy link
Contributor

tan75 commented Dec 29, 2021

hi @date-fns/i18n-it
could you please have a look into it? Is this a correct approach?

Copy link
Member

@albertorestifo albertorestifo left a comment

Choose a reason for hiding this comment

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

Yep, I've never written it with the "º" in my life

@vin-car
Copy link
Member

vin-car commented Jan 3, 2022

Yes, using the "°" for ordinal dates is quite uncommon, it has sense mostly for the first day of the month.

@fturmel
Copy link
Member

fturmel commented Jan 6, 2022

Hope it's alright, I rebased and updated the snapshot.md file to make it easier to review and merge.

@leshakoss leshakoss mentioned this pull request Jan 7, 2022
26 tasks
@leshakoss leshakoss merged commit 576ea32 into date-fns:master Jan 10, 2022
@davidspiess davidspiess deleted the change-ordinal-number-it-locale branch July 22, 2022 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants