Skip to content

Request Ability to Set Default Timezone and Locale for Date Pipe Application Wide  #19018

@jmcclanahan

Description

@jmcclanahan

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[X ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Currently you have to specify a timezone and/or locale for every instance of the Date pipe you have. Otherwise, according to the docs, "If not specified, the local system timezone of the end-user's browser will be used.".

Expected behavior

It would be nice to have a way to set the default values for these fields for the entire app, rather than having to add these to every instance of the date pipe.

What is the motivation / use case for changing the behavior?

If you have more than a handful of date pipes throughout your app it would good to have a single place to change the timezone and locale rather than having to change all instances each time you want to make a change. In my current application I have hundreds of date pipes scattered throughout the app.

Environment


Angular version: 5.0.0-beta.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nIssues related to localization and internationalizationfeatureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions