Skip to content

[Form] properly parse dates before the Gregorian calendar #31374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented May 3, 2019

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #29610 #31057
License MIT
Doc PR

@xabbuh xabbuh force-pushed the issue-29610-31057 branch from da8ba92 to 1c8c387 Compare May 6, 2019 19:01
nicolas-grekas
nicolas-grekas previously approved these changes May 9, 2019
@nicolas-grekas
Copy link
Member

Status: needs work
(tests fail on appveyor)

@javiereguiluz
Copy link
Member

Could any Windows user please help us debug the failing test? Thanks.

@nicolas-grekas
Copy link
Member

Could the failure be related to an old version of intl?

@ro0NL
Copy link
Contributor

ro0NL commented Jul 18, 2019

i wasnt able to reproduce with ICU 52.1 on Linux

php -r "var_dump((new DateTime((new IntlDateFormatter('en', 2, -1, new DateTimeZone('UTC'), 1, 'yyyy-MM-dd HH:mm:ss'))->format(-32157216000)))->format('Y-m-d'));"
string(10) "0950-12-19"

@xabbuh xabbuh force-pushed the issue-29610-31057 branch from cfcc9a7 to d5c896f Compare July 23, 2019 13:29
nicolas-grekas added a commit that referenced this pull request Jul 23, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] relax some date parser patterns

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

While debugging the failures in #31374 I realised that the `IntlDateFormatter` from the Intl component parses dates more strictly than PHP's `IntlDateFormatter` class does.

Commits
-------

7d0793a relax some date parser patterns
@xabbuh
Copy link
Member Author

xabbuh commented Feb 10, 2020

closing here as I don't know how to make tests succeed on AppVeyor

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

Successfully merging this pull request may close these issues.

5 participants