Skip to content

Commit

Permalink
[Form] Adapted HTML5 format in DateTimeType as response to a closed I…
Browse files Browse the repository at this point in the history
…CU ticket
  • Loading branch information
webmozart committed Nov 2, 2012
1 parent 297e00a commit a0af8bf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php
Expand Up @@ -42,20 +42,20 @@ 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
*
* 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,
Expand Down

0 comments on commit a0af8bf

Please sign in to comment.