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 single-letter form of wednesday in Spanish #3472

Merged

Conversation

mindouro
Copy link

The single-letter form of Wednesday in Spanish is 'X' and not 'M'.

Quoting Wikipedia: "The Spanish language also has an established convention for days of the week using one letter. These are: L – lunes (Monday); M – martes (Tuesday); X – miércoles (Wednesday); J – jueves (Thursday); V – viernes (Friday), S – sábado (Saturday); and D – domingo (Sunday). Each day of the week is written using its first letter except Wednesday, which is represented by the letter X in order to avoid confusion between martes (Tuesday) and miércoles (Wednesday), which both begin with an m."

@harogaston
Copy link
Contributor

Hi @mindouro thank you for your contribution. I see your point and I agree with your evidence. Nonetheless I have one concern. That use ('x' instead of 'm') makes sense in environments where all days of the week are listed. I am concerned that it makes less sense in isolation - i.e. `x 13 Octubre' looks a bit off.

I would like to have the opinion of other members on this @date-fns/i18n-es

@harogaston harogaston self-assigned this Sep 13, 2023
@harogaston harogaston added 🌎 I18n fix 🤔 Feedback wanted Community feedback is required labels Sep 13, 2023
Copy link

@harshsingh32 harshsingh32 left a comment

Choose a reason for hiding this comment

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

lgtm

@harogaston
Copy link
Contributor

@mindouro You will have to update your PR, there are more files that need changes on order for this to work. Please have a look at the rest of the files i.e.

const matchDayPatterns = {
narrow: /^[dlmjvs]/i,
short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i,
}
const parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i] as const,
any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i] as const,
}

@harogaston harogaston force-pushed the change-single-letter-weekday-spanish branch from 4a447f1 to dd04f21 Compare September 26, 2023 01:46
@harogaston harogaston merged commit b3ddacb into date-fns:v2 Sep 26, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 Feedback wanted Community feedback is required 🌎 I18n fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants