Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

[future] Add days of the week #20

Open
littledan opened this issue Jun 16, 2017 · 5 comments
Open

[future] Add days of the week #20

littledan opened this issue Jun 16, 2017 · 5 comments

Comments

@littledan
Copy link
Member

This is a pretty basic feature that's missing. Should we add it into the [[Units]] field, as @rxaviers suggested? I don't think it should overlap as CLDR stores them in the same place.

@rxaviers
Copy link
Member

Yeap, technically we should be able to have rtf.format(-1, 'tue') === 'last Tuesday'.

@littledan
Copy link
Member Author

We should probably also make sure to allow rtf.format(0, 'tue') === 'Tuesday'--allow UDAT_DIRECTION_PLAIN in addition to past and future.

ICU seems to support only last, this and next for days of the week (maybe it supports two ago and two in the future, but for English these gave the empty string). I'd suggest we throw an exception if a value rather than an empty string here.

@caridy caridy changed the title Add days of the week [future] Add days of the week Jun 27, 2017
@zbraniecki
Copy link
Member

this seems to me like it should actually be

rtf.format(0, 'tue') === 'this Tuesday'

rather than just Tuesday.

@littledan
Copy link
Member Author

Can we decide whether we want this feature or not? It's marked as future here, and not included in the spec text, but then in the explainer, it's included. It could confuse users to have a mismatch.

littledan added a commit to littledan/proposal-intl-relative-time that referenced this issue Jul 14, 2017
This feature seems to be in the "future" category, see Issue tc39#20
@zbraniecki
Copy link
Member

I'm ok leaving it for V2.

caridy pushed a commit that referenced this issue Jul 14, 2017
* Explainer: Remove days of the week

This feature seems to be in the "future" category, see Issue #20

* Explainer: Comment about bestFit options

* Explainer: Document formatToParts

Also, these are no longer bound methods

Closes #37

* Explainer: Why isn't the design more low-level

Closes #36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants