ZF-12248: Zend_Date::WEEKDAY_SHORT not behaving as documented

Issue Type: Bug Created: 2012-05-25T11:12:20.000+0000 Last Updated: 2012-05-25T11:12:20.000+0000 Status: Open Fix version(s): Reporter: David Marland (djmarland) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:


When using

<pre class="highlight">

the expected result is "Weekday (Name of the day, localized, abbreviated, two to four chars)" according to:…

(Zend/Date.php line 604):

<pre class="highlight">
$day = Zend_Locale_Data::getContent($locale, 'day', array('gregorian', 'format', 'wide', $weekday));
return $this->_toComment(iconv_substr($day, 0, 3, 'UTF-8'));

The is simply taking the first 3 characters in all cases.

When setting a different locale (e.g Welsh) these are the translations that are stored for 'wide'

<pre class="highlight">
Dydd SulDydd LlunDydd MawrthDydd MercherDydd IauDydd GwenerDydd Sadwrn

Therefore all the days just come back as 'Dyd'. The code should make use of 'abbreviated' which is already stored (for Welsh at least). ```


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.