merged branch bschussek/datetimeimpr (PR #5896)

This PR was merged into the 2.1 branch.

Commits
-------

a0af8bf [Form] Adapted HTML5 format in DateTimeType as response to a closed ICU ticket

Discussion
----------

[Form] Adapted HTML5 format in DateTimeType as response to a closed ICU ticket

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
This commit is contained in:
Fabien Potencier 2012-11-02 18:59:59 +01:00
commit c589982df6

View File

@ -42,6 +42,8 @@ class DateTimeType extends AbstractType
* * "Z" for UTC
* * "(-|+)HH:mm" for other timezones (note the colon!)
*
* For more information see:
*
* http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax
* http://www.w3.org/TR/html-markup/input.datetime.html
* http://tools.ietf.org/html/rfc3339
@ -49,13 +51,11 @@ class DateTimeType extends AbstractType
* An ICU ticket was created:
* http://icu-project.org/trac/ticket/9421
*
* To temporarily circumvent this issue, DateTimeToRfc3339Transformer is used
* when the format matches this constant.
*
* ("ZZZZZZ" is not recognized by ICU and used here to differentiate this
* pattern from custom patterns).
* It was supposedly fixed, but is not available in all PHP installations
* yet. To temporarily circumvent this issue, DateTimeToRfc3339Transformer
* is used when the format matches this constant.
*/
const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ssZZZZZZ";
const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ssZZZZZ";
private static $acceptedFormats = array(
\IntlDateFormatter::FULL,