icu
icu copied to clipboard
ICU-22763 MF2: Handle time zones correctly in :datetime
Previously, the time zone components of date/time literals were ignored. In order to store the time zone properly for re-formatting, this change also changes the representation of Formattable
date values to use a GregorianCalendar
rather than a UDate
.
This is a public API change and a design doc can be found in the "ICU 76 API proposal status" document (and was also emailed to the icu-design list on April 29.)
In the TC discussion on May 9, there was some uncertainty about whether to use GregorianCalendar
or Calendar
as the return type of message2::Formattable::getDate()
. I'm leaving it as GregorianCalendar
for now but can change it if necessary.
Checklist
- [x] Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-22763
- [x] Required: The PR title must be prefixed with a JIRA Issue number.
- [x] Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
- [x] Required: Each commit message must be prefixed with a JIRA Issue number.
- [x] Issue accepted (done by Technical Committee after discussion)
- [x] Tests included, if applicable
- [x] API docs and/or User Guide docs changed or added, if applicable