Title: DatePipe define global default pattern · Issue #11376 · angular/angular · GitHub
Open Graph Title: DatePipe define global default pattern · Issue #11376 · angular/angular
X Title: DatePipe define global default pattern · Issue #11376 · angular/angular
Description: I'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/an...
Open Graph Description: I'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request...
X Description: I'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not su...
Opengraph URL: https://github.com/angular/angular/issues/11376
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DatePipe define global default pattern","articleBody":"**I'm submitting a ...** (check one with \"x\")\n\n```\n[ ] bug report => search github for a similar issue or PR before submitting\n[x] feature request\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\n```\n\nCurrently the default pattern is `mediumDate` but in a other language like german the default pattern should be `ddMMyy`\n\n**Current behavior**\nOverwrite pattern on every pipe:\n\n``` html\n\u003cp>{{ myDate | date:'ddMMyy' }}\u003c/p>\n\u003cp>{{ myOtherDate | date:'ddMMyy' }}\u003c/p>\n\u003cp>{{ otherVar }}\u003c/p>\n\u003cp>{{ myOtherOtherDate | date:'MMyyDD' }}\u003c/p>\n```\n\n**Expected/desired behavior**\nThere should be a variable like `LOCAL_ID` shich can be overwritten:\n\n``` ts\n@NgModule({\n providers: [\n {provide: LOCAL_PIPE_DATE_PATTERN, useValue: 'ddMMyy'},\n ],\n})\nexport class AppModule {}\n```\n\nSo we can use:\n\n``` html\n\u003cp>{{ myDate | date }}\u003c/p>\n\u003cp>{{ myOtherDate | date }}\u003c/p>\n\u003cp>{{ otherVar }}\u003c/p>\n\u003cp>{{ myOtherOtherDate | date:'MMyyDD' }}\u003c/p>\n```\n\n**What is the motivation / use case for changing the behavior?**\nIn some languages like german we want dates like '2016-02-01' written '01.02.2016' so, it would be much better to define a default pattern per \"language\" instead of set the pattern on every pipe.\n\n**Please tell us about your environment:**\n- **Angular version:** 2.0.0-rc.6\n- **Browser:** [all] \n- **Language:** [all] \n","author":{"url":"https://github.com/fank","@type":"Person","name":"fank"},"datePublished":"2016-09-06T12:19:26Z","url":"https://github.com/angular/angular/issues/11376"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:44df74ea-3260-bdf1-0cee-6d4d6a7437bb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9128:2D2F2F:1DE7604:2638FE9:6B01511E |
| html-safe-nonce | 79a235a6783dadebdd6768d2692d55c1947a2a8870525541fec5a781b6370a82 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTI4OjJEMkYyRjoxREU3NjA0OjI2MzhGRTk6NkIwMTUxMUUiLCJ2aXNpdG9yX2lkIjoiMTU3MTk3NTU1OTg5Mjc4MzM5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 913f87b6b5a33cc1774c7400ac2108601a6ae4867be2032550e87e1e9c31433d |
| hovercard-subject-tag | issue:175232694 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/11376/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b06c01b8105e7f9295b31a923147b8f3594672f645eceb09eed4c4fc6c7e3d82/angular/angular/issues/11376 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b06c01b8105e7f9295b31a923147b8f3594672f645eceb09eed4c4fc6c7e3d82/angular/angular/issues/11376 |
| og:image:alt | I'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fank |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width