briannesbitt / Carbon

A simple PHP API extension for DateTime.
https://carbon.nesbot.com/
MIT License
16.58k stars 1.28k forks source link

Czech (CS) uses genitive case when using iso format `MMMM YYYY` #3063

Open DannyJJK opened 3 months ago

DannyJJK commented 3 months ago

Hello,

I encountered an issue with the following code:

\Carbon\Carbon::create('2024-01-01')->locale('cs')->isoFormat('MMMM YYYY')

Carbon version: 3.7.0

PHP version: 8.3.10

I expected to get:

leden 2024

But I actually get:

ledna 2024

I tried this with Polish (which has similar noun cases) and it works correctly. It should only be "ledna" when the month day is also provided.

This is correct:

\Carbon\Carbon::create('2024-01-01')->locale('cs')->isoFormat('Do MMMM YYYY')
"1 ledna 2024"