Bug 231545

Summary: REGRESSION (iOS 15): Intl.DateTimeFormat returns 2 digit years when year is 'numeric' and month is '2-digit' and day is '2-digit'
Product: WebKit Reporter: Matt Carroll <matt.carroll139>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ysuzuki
Priority: P2    
Version: Other   
Hardware: iPhone / iPad   
OS: Other   
See Also: https://bugs.webkit.org/show_bug.cgi?id=230827

Description Matt Carroll 2021-10-11 17:00:19 PDT
This test case passes:

```
const dtf = new Intl.DateTimeFormat('en-AU', { timeZone: 'Australia/Melbourne', year: 'numeric' });
const date = new Date(2021, 9, 2);
const parts = dtf.formatToParts(date);
const year = parts.find(part => part.type === 'year')
shouldBe(year.value, "2021")
```


This test case will fail:

```
const dtf = new Intl.DateTimeFormat('en-AU', { timeZone: 'Australia/Melbourne', year: 'numeric', month: '2-digit', day: '2-digit' });
const date = new Date(2021, 9, 2);
const parts = dtf.formatToParts(date);
const year = parts.find(part => part.type === 'year')
shouldBe(year.value, "2021") // actual is "21"
```
Comment 1 Yusuke Suzuki 2021-10-12 14:28:31 PDT
Thanks! This is dupe of bug 230827.

*** This bug has been marked as a duplicate of bug 230827 ***