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

Add format for narrow week days #176

Closed
ghost opened this issue Nov 22, 2019 · 5 comments · Fixed by #703
Closed

Add format for narrow week days #176

ghost opened this issue Nov 22, 2019 · 5 comments · Fixed by #703
Labels
P3 A lower priority bug or feature request package:intl type-enhancement A request for a change that isn't a bug

Comments

@ghost
Copy link

ghost commented Nov 22, 2019

It seems that the DateFormat class does not support narrow week days.

Reference:
intl/lib/src/data/dates/symbols/en_US.json

"NARROWWEEKDAYS":["S","M","T","W","T","F","S"],
"STANDALONENARROWWEEKDAYS":["S","M","T","W","T","F","S"]
@alan-knight
Copy link
Contributor

It does seem like that. Rather odd. I don't want to make up formats, though. These are based on ICU, so it seems either we're not implementing one of theirs correctly or else we're missing a format specifier. (Or maybe they don't support it either).

@ghost
Copy link

ghost commented Nov 23, 2019

It does seem like that. Rather odd. I don't want to make up formats, though. These are based on ICU, so it seems either we're not implementing one of theirs correctly or else we're missing a format specifier. (Or maybe they don't support it either).

Hmm, will intl add a format specifier for narrow week days in the future?

I think narrow week days are useful for calendar day titles. And I saw that Formatting Dates and Times - ICU User Guide has a field pattern for narrow week days(EEEEE). Maybe we can add a DateFormat.EEEEE([locale]) method that return narrow week days format. Of course, this is just my personal thought.

Field Patterns Examples
E, EE, or EEE Tue
EEEE Tuesday
EEEEE T
EEEEEE Tu

Reference: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table

@mosuem mosuem added type-enhancement A request for a change that isn't a bug P3 A lower priority bug or feature request labels Nov 2, 2022
@mosuem mosuem transferred this issue from dart-archive/intl Apr 18, 2023
@cleong98
Copy link

Hi Hi, about this have any update? if haven't update can i doing some change and pr this?

@mosuem
Copy link
Member

mosuem commented Aug 18, 2023

Does #703 address your issue @cleong98?

@cleong98
Copy link

cleong98 commented Aug 18, 2023

Thanks for reply i think yes @mosuem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request package:intl type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants