Bug #75043 [NEW]: IntlDateFormatter incorrectly formats days of week for es_MX

From: Date: Mon, 07 Aug 2017 09:13:28 +0000
Subject: Bug #75043 [NEW]: IntlDateFormatter incorrectly formats days of week for es_MX
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210546@lists.php.net to get a copy of this message
From: gytis dot skema at gmail dot com Operating system: Ubuntu 16.04 PHP version: 7.0.22 Package: Calendar related Bug Type: Bug Bug description:IntlDateFormatter incorrectly formats days of week for es_MX Description: ------------ "vie" and 'lun' do not end with a dot, but should, as described in http://demo.icu-project.org/icu-bin/locexp?d_=en&_=es_MX Also, es_ES returns uppercased first letter, while es_MX does not. This should be investigated Test script: --------------- $formatter = new \IntlDateFormatter( 'es_MX', \IntlDateFormatter::NONE, \IntlDateFormatter::NONE, ini_get('date.timezone') ); $formatter->setPattern('ccc'); var_dump([ $formatter->format(new DateTime('2018-09-05')), $formatter->format(new DateTime('2018-09-06')), $formatter->format(new DateTime('2018-09-07')), $formatter->format(new DateTime('2018-09-08')), $formatter->format(new DateTime('2018-09-09')), $formatter->format(new DateTime('2018-09-10')), $formatter->format(new DateTime('2018-09-11')), ]); Expected result: ---------------- 0 => string 'Mié.' (length=5) 1 => string 'Jue.' (length=4) 2 => string 'Vie.' (length=3) 3 => string 'Sáb.' (length=5) 4 => string 'Dom.' (length=4) 5 => string 'Lun.' (length=3) 6 => string 'Mar.' (length=4) -- Edit bug report at https://bugs.php.net/bug.php?id=75043&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75043&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75043&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75043&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75043&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75043&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75043&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75043&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75043&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75043&r=support Expected behavior: https://bugs.php.net/fix.php?id=75043&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75043&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75043&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75043&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75043&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75043&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75043&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75043&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75043&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75043&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75043&r=mysqlcfg

« previous php.bugs (#210546) next »