Update NativeDateAdapter to use the new i18n api
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### Bug, feature request, or proposal:
Feature Request
#### What is the expected behavior?
Material should no longer use the intl API with Angular v5.
#### What is the current behavior?
Material's NativeDateAdapter uses the intl API
#### What are the steps to reproduce?
Providing a StackBlitz/Plunker (or similar) is the *best* way to get the team to see your issue.
Plunker starter (using on `@master`): https://goo.gl/DlHd6U
StackBlitz starter (using latest `npm` release): https://goo.gl/wwnhMV
#### What is the use-case or motivation for changing an existing behavior?
In Angular v5 we have removed the dependency on the intl API to use CLDR data instead. We've also added a new I18n API that can be used by libraries for such a case.
It's very easy to rewrite the NativeDateAdapter to use this instead of intl. The only problem is that Material requires a few formats that are not yet supported by the API.
We can write an adapter that does partial matching, but it'd be better to wait for https://github.com/angular/angular/issues/19823 to be resolved first.
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Implementierung von NativeDateAdapter zu finden und zu überprüfen, wie sie derzeit die intl API verwendet. Vergleiche die erforderlichen Datumsformate mit der neuen I18n API von Angular v5 und prüfe die Abhängigkeit von Angular issue 19823; abgeschlossen ist die Arbeit, wenn NativeDateAdapter intl nicht mehr verwendet und gleichzeitig die erforderlichen Formate unterstützt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- internationalization
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100