-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implement support for TimeZone information + General enhancements #11
Conversation
arjanmels
commented
Sep 8, 2024
- Add support for Timezones
- Included all locales that are available from CLDR
- Changed includes to improve compile times when only limited number of locales is used (breaking change)
- Improved documentation
Corrected Language to Locale
- Add DateRange to Timezone (to allow checking of valid range for this timezone).
Other minor cleanup
Improved README.md.template
Renamed city to exemplarCity
Fixed compatibility with collection 1.17.2
Thanks a lot. It looks great 👍 The only small thing I'm not 100% sure is the "common_locale_data_all.dart" library. I would not have bothered with that and the explanation around it. But if you think it's useful to you, then why not. |
Also, I think Maybe we could make class CommonLocaleDataHolder {
}
final CommonLocaleData = CommonLocaleDataHolder();
// in en.dart
extension CommonLocaleDataEnExtension on CommonLocaleDataHolder {
CommonLocaleData get en => CommonLocaleDataEn();
} That way, we have the Not the most beautiful. Maybe we could repurpose the |
Not very useful for myself, but a convenience if you want to include ALL locales dynamically (which will result in several 10MB file size). |
Agree the previous syntax looked nicer. (Also minor niggle is that the CommonLocaleDataEn() will create a new object reach time: these objects are very small as most members are statics, but not 100% elegant.) I'm not sure the extension methods will work with statics (you can only call them on the extension method name, not the original class name and you cannot have multiple extensions with the same name). I haven't found a more elegant way that both keeps the tree shaking and good compile times. |
Removed unused import from test
I fixed the dead code and unnecessary import warning that the build was failing on. |
@xvrh Not sure if you got time to look at this pull request again? Are there further changes needed, to allow you to merge this change? |
Merged with #14 |