symfony/symfony — Issue #3229: date Field type documentation bug
Author: zerkms
Created: 2012-01-31 04:00:21+00:00
State: open

It is actually a documentation bug but I haven't found where to file them. So:

http://symfony.com/doc/current/reference/forms/types/date.html -- here it is specified that

> For more information on valid formats, see Date/Time Format Syntax. For example, to render a single text box that expects the user to end YYYY-MM-dd, use the following options:

and the issue is that according specification http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax (which php's IntlDateFormatter follows) `YYYY` is **not a valid year format** and `yyyy` should be used instead.

If you specify the format as specified in documentation you'll always get `1970` as year fraction.

Reated: https://bugs.php.net/bug.php?id=52283

PS: also at http://symfony.com/doc/current/reference/forms/types/datetime.html `with_seconds` should be documented (or some link to time field should be added). Because datetime supports `with_seconds` parameter but nothing is said in documentation.