Skip to content

PHP 8.1.9 intl IntlDateFormatter fails to format dates #9365

Closed

Description

@ItsReddi

Description

The following code:

$date = new IntlDateFormatter(locale: 'en_US', dateType: IntlDateFormatter::SHORT, timeType: IntlDateFormatter::NONE);
$date->setPattern('EEEEEE');
echo $date->format(1660821794);

$date = new IntlDateFormatter(locale: 'de_DE', dateType: IntlDateFormatter::SHORT, timeType: IntlDateFormatter::NONE);
$date->setPattern('EEEEEE');
echo $date->format(1660821794);

Resulted in this output: (Today was Thursday)

Th Th

But I expected this output instead: (Output from PHP 8.0)

Th Do.

PHP Version

PHP 8.1.9

Operating System

php:8.1.9-fpm-alpine

Activity

  1. cmb69 commented on Aug 18, 2022

    @cmb69
    Member

    Would #8656 (comment) solve that for you?

  2. ItsReddi commented on Aug 18, 2022

    @ItsReddi
    Author

    Yes that will be the issue. thanks. #invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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