-
Notifications
You must be signed in to change notification settings - Fork 176
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
readable_datetime
does not support week
#933
Comments
@DmitrySharabin since this is i18n related, do you have any thoughts? |
Since I personally never needed this precision in my apps, I had to research a bit to see what we already have in browser for now to be ready to give a meaningful answer (I hope). 😊 AFAIK, we already have The corresponding widget has the translation of the word “week” depending on the user's locale set in the OS (I guess). The value returned by the picker is consistent and looks something like So for However, I'm not sure whether it's possible to obtain the translation of the word “week” to format the output this way, since
I'm not quite sure about this approach. As @BarishNamazov mentioned, different locales use different start of week. So, this week is Btw, I think (for the sake of consistency) we should also support: Date components
Date component formatting
|
Thank you for the research @DmitrySharabin! Regardless of localizing the word "week", I do think ranges are more understandable than a week index. Offhand, do you know when Week 42 is? I have no idea! Knowing the start of a week for a given locale is an open issue for Instead of outputting two entire dates for a range, I think we should have a I agree we should have a We should definitely also make sure our datetime stuff doesn't choke on week date formats like |
Hey I am new to open Source , If do you need any help just let me know , I can help with this . |
readable_datetime(date, precision?)
does not supportprecision='week'
. Internationalization makes this particularly hard to solve (different locales use different start of week, too). I think in any case, weeks are full Monday to Sunday, so something like10/10/2022-10/17/2022
would be an option (orOct 10 2022 - Oct 17 2022
).The text was updated successfully, but these errors were encountered: