Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

Fix for French language using English day suffixes#16

Open
mitchjacksontech wants to merge 1 commit intogbarr:nextfrom
mitchjacksontech:next
Open

Fix for French language using English day suffixes#16
mitchjacksontech wants to merge 1 commit intogbarr:nextfrom
mitchjacksontech:next

Conversation

@mitchjacksontech
Copy link

# Before: jan 30th 2019
# After:  jan 30e 2019
Date::Language->new('French')->time2str( "%b %o %Y", time() );

sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_o { sprintf("%2de",$_[0]->[3]) }
Copy link

@atoomic atoomic Jan 13, 2020

Choose a reason for hiding this comment

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

a better French fix will be to do not use the suffix as it s not very common

The current suggested fix will be wrong in several cases
for example: 1st should be 1er,
then after ème is better than e for every other enumeration ....

Copy link
Author

@mitchjacksontech mitchjacksontech Jan 14, 2020

Choose a reason for hiding this comment

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

Not being French myself, I defer to you and wikipedia, the better fix is do not use the suffix.

Will update the pull request accordingly

Koan-Bot added a commit to Koan-Bot/perl-TimeDate that referenced this pull request Feb 26, 2026
French format_o was returning the bare day number instead of
adding a suffix like other language modules. Now returns "1e",
"15e" etc. consistent with Dutch, Swedish, Finnish, Russian.

Note: French convention is technically "1er" for the first day,
but this matches the simplified approach used by most language
modules in this distribution.

Originally submitted as gbarr#16 by @mitchjacksontech

Co-Authored-By: mitchjacksontech <mitchjacksontech@users.noreply.github.com>
@Koan-Bot
Copy link

Migration Notice

This repository is no longer actively maintained. The official source has moved to atoomic/perl-TimeDate.

This PR has been migrated to the new repository:

Thank you @mitchjacksontech for the original contribution!


🤖 Automated migration by Kōan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants