angular / angular/components

Update NativeDateAdapter to use the new i18n api

Aperta
#8,100 4 commenti 8 reazioni 0 assegnatari Vedi su GitHub
area: material/datepicker i18n P2
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia individuando l’implementazione di NativeDateAdapter e verificando come utilizza attualmente la intl API. Confronta i formati di data richiesti con la nuova I18n API di Angular v5 e verifica la dipendenza da Angular issue 19823; il lavoro è completato quando NativeDateAdapter non utilizza più intl, supportando al contempo i formati richiesti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
internationalization
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.