Skip to content

[Form] Date type does not accept years before 1902/after 2037 #5227

Closed
@Irohane

Description

@Irohane

IntlDateFormatter have some issues in transformation of Date.

$fmt = new IntlDateFormatter('en_US', IntlDateFormatter::SHORT, IntlDateFormatter::SHORT, 'UTC', IntlDateFormatter::GREGORIAN, 'yyyy');

$value = new DateTime();
$value->setDate(1900, 1, 1);

var_dump($fmt->format($value));

Expected: string '1900'
Actual: boolean false

Since Date widget base on this formatter, by default it only display years in range 1902-2037.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions