Skip to content

feat(common): DatePipe default option(s) injection token  #39194

@Totati

Description

@Totati

🚀 feature request

Relevant Package

This feature request is for @angular/common

Description

There's no option for the DatePipe to override the default format: 'mediumDate', or set timezone with injection token.

Describe the solution you'd like

It would be really good to configure other attributes of the DatePipe with an injection than LOCALE. We use 'shortDate' format for 85% of the times (120/140) - 10% is 'short' and 5% is custom, never 'mediumDate', and we have to write it out every single time.

Describe alternatives you've considered

I know we could extend the date pipe, and set it there, but then I should force our teem to use it against the built in one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5The team acknowledges the request but does not plan to address it, it remains open for discussionarea: commonIssues related to APIs in the @angular/common packagefeatureLabel 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