Closed FranciscoCaldeira closed 6 months ago
Hello,
parseFromLocale
is only able to translate day names or month names in the given string from the given locale to English, then it will try to use the result into new Carbon($englishString)
.
You can either give your format explicitly:
echo Carbon::createFromFormat('d/m/Y', '31/05/2022');
Or use the L
ISO-format which is for instance DD/MM/YYY in Portuguese but MM/DD/YYYY in US English:
echo Carbon::createFromLocaleIsoFormat('L', 'pt', '31/05/2022');
Thanks,
Hello,
I encountered an issue with the following code:
Carbon version: * 3.4.0
PHP version: 8.3.6
I expected to get:
But I actually get:
Thanks!