Preposition in IntlDateFormatter

From: Date: Sun, 19 Nov 2017 21:55:14 +0000
Subject: Preposition in IntlDateFormatter
Groups: php.internals 
Request: Send a blank email to internals+get-101143@lists.php.net to get a copy of this message
Hello internals, I just noticed an issue with PHP's DateFormatter and some locales. Consider this example code:
foreach (['en', 'de', 'da', 'pt', 'fr', 'cs'] as $locale) {
    $df = new IntlDateFormatter($locale, IntlDateFormatter::LONG, IntlDateFormatter::SHORT);
    var_dump($locale . ': ' . $df->format(new DateTime()));
}
which will output the following:
string(33) "en: November 19, 2017 at 10:28 PM" string(30) "de: 19. November 2017 um 22:28" string(31) "da: 19. november 2017 kl. 22.28" string(32) "pt: 19 de novembro de 2017 22:28" string(29) "fr: 19 novembre 2017 à 22:28" string(28) "cs: 19. listopadu 2017 22:28"
As you can see, the first examples all have a preposition before the time. But there is none for the Czech language - there should be a "v". Some other languages are missing their prepositions as well, e.g. pl and se (and probably more). Is this a bug? I am no native speaker in these languages, but got a bug report from a user and did some research. In my opinion, the prepositions are missing. Thanks, Markus

« previous php.internals (#101143) next »