Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Date pipe - Support narrow form for weekdays in #12294

Closed
JohnKis opened this issue Oct 14, 2016 · 2 comments · Fixed by #12297
Closed

Feature Request: Date pipe - Support narrow form for weekdays in #12294

JohnKis opened this issue Oct 14, 2016 · 2 comments · Fixed by #12297
Labels
area: common Issues related to APIs in the @angular/common package feature Issue that requests a new feature freq2: medium

Comments

@JohnKis
Copy link

JohnKis commented Oct 14, 2016

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/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
With the current implementation of the date pipe, It's not possible to render weekdays in narrow form (M, T, W, T, F, S, S).

Expected behavior
It would be useful to be able to render weekdays in narrow form.

What is the motivation / use case for changing the behavior?
Date pickers often use the narrow format to display the days of the week. At the moment if you want to achieve this, you need to create an Intl.DateTimeFormatter in your component, and pass the weekdays as a string. It'd be more ideal to use actual dates and the date pipe in the template. Since it's supported by the JS INTL API, I imagine that it should be a trivial change. As for the format string, I feel that 'EE' should be appropriate here.

Please tell us about your environment:
macOS Sierra, NPM 3.10.3

  • Angular version: 2.0.1
  • Browser: all
  • Language: all
  • Node (for AoT issues): node --version = v6.3.0
@laskoviymishka
Copy link
Contributor

laskoviymishka commented Oct 14, 2016

Yep, missed this one. Since it supported by Intl.API it should not be really hard to change

@pkozlowski-opensource pkozlowski-opensource added feature Issue that requests a new feature area: common Issues related to APIs in the @angular/common package freq2: medium labels Oct 14, 2016
laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016
laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016
laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016
laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016
laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016
laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: common Issues related to APIs in the @angular/common package feature Issue that requests a new feature freq2: medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants