date
date copied to clipboard
Return incorrect ordinals numbers to fr_CA
Is it possible to include fr_CA to numbers in the following format: 12e ??
Numbers of what? Because if you mean the day number, then in French (including fr_CA) day number should only have ordinal for the 1
=> 1er
. All other days does not have ordinal.
The reason is simple : you don't say "Mardi second Mars", you say: "Mardi deux Mars", no ordinal form.
So it should not be implemented in the regular translation. It would be grammatically wrong.
If you're still really sure you want to override this for you app, you can use:
\Carbon\Translator::get('fr_CA')->setTranslations([
'ordinal' => function ($number) {
return $number.($number === 1 ? 'er' : 'e');
},
]);