Issues

ZF-11291: Incorrect date localisation with Zend_Date::DATE_MEDIUM

Issue Type: Bug Created: 2011-04-14T18:27:36.000+0000 Last Updated: 2011-04-16T21:04:07.000+0000 Status: Closed Fix version(s): Reporter: Toni Wenzel (twenzel) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

  • Zend_Locale
  • zend_date

Related issues: Attachments:

Description

{quote} $date = new Zend_Date();

$date->toString(Zend_Date::DATE_MEDIUM); {quote}

With 'de' locale this code outputs a date with ??dd.MM.yyyy?? format (e.g 30.08.2009). With 'en' locale it outputs a date with ??MMM d, y?? format (e.g. Aug 30, 2008) instead of a +MM/dd/yyyy+ format

Comments

Posted by Thomas Weidner (thomas) on 2011-04-16T21:04:07.000+0000

CLDR (or the official world) uses as medium date:

      <dateFormatLength type="medium">
        <dateFormat>
          <pattern>MMM d, y</pattern>
        </dateFormat>
      </dateFormatLength>

When you think that these informations are wrong than there are three solutions:

1.) Use another constant which conforms your need 2.) Define the date format you want to have manually 3.) Add an issue to CLDR (http://cldr.unicode.org)

My opinion is that unicode knows what the correct informations are.

Therefor closing this issue as non-issue.

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts