Update NativeDateAdapter to use the new i18n api
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par localiser l’implémentation de NativeDateAdapter et examiner comment elle utilise actuellement l’intl API. Comparez les formats de date requis avec la nouvelle I18n API d’Angular v5 et vérifiez la dépendance à Angular issue 19823 ; le travail est terminé lorsque NativeDateAdapter n’utilise plus intl tout en prenant en charge les formats requis.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- internationalization
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100