-
Notifications
You must be signed in to change notification settings - Fork 29
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
Implements the ECMA402 trait for Intl.DateTimeFormat. #165
Conversation
@zbraniecki PTAL I am still not sure about the options -- perhaps a better choice can be made. |
In my ICU4X attempt I did the following logic for https://github.com/zbraniecki/icu4x/blob/datetime/components/datetime/src/options/components.rs and https://github.com/zbraniecki/icu4x/blob/datetime/components/datetime/src/options/style.rs which uses https://github.com/zbraniecki/icu4x/blob/datetime/components/datetime/src/options/mod.rs Would it be something worth considering to align here (or there)? |
tl;dr: I'd attempt to do (1) from below, unless you think a better approach is available. Ideally, an interface definition should dictate what the implementation has to conform to. So if at all possible, I'd prefer to try to modify the implementation in icu4x to conform. In practice, of course, we extract or retrofit interfaces. I hope that it would be possible to:
Now, I think we can't go around implementing the options enum, since the configuration is part of the API surface, unless we're willing to have the trait be "stringly" typed. But let me know if I'm mistaken. It seemed like a reasonable tradeoff to allow for |
I'm mostly talking about "nesting" of options into |
923cda7
to
f2fe47b
Compare
Closes: #164