Skip to content

[Form] BirthdayType and dates before 1583 #31057

@althaus

Description

@althaus

Symfony version(s) affected: 4.2.x

Description

We encountered an issue with the BirthdayType and dates before the Gregorian calendar changes took place. I don't know the reason, but it maybe just an issue with php-intl. When using January, 1st 1582 as a birthday the view format (using German format in the screenshot) goes nuts:

birthday

PHP got it correctly but the view format gets off the 11 added days: https://en.wikipedia.org/wiki/Gregorian_calendar#Gregorian_reform

How to reproduce

Create a form with a BirthdayType and set new \DateTime('1582-01-01) as the data.

Possible Solution

No clue. As this seems to be handled by the IntlFormatter that is broken or unable to handle this? I' just confused.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions