Replies: 2 comments
-
ICU4X exposes time zone display names with the power-user class icu_datetime::time_zone::TimeZoneFormatter. https://icu4x.unicode.org/doc/icu_datetime/time_zone/struct.TimeZoneFormatter.html |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ok, thank you. That answers this one. I am afraid I will be back soon with more questions though :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So, as I mentioned in a previous discussion (#2810), I am doing some experiments with having .net runtimes use icu4x as a replacement for icu4c. I am having some trouble mentally mapping concepts between the two libraries. I think my question before was too broad, so I am going to ask a more specific one and hope I can get some generalized knowledge out of it.
Right now, I am looking at this function which basically https://github.com/dotnet/runtime/blob/b49fcc6c5a131608813dcd68760270c18ebd11bb/src/native/libs/System.Globalization.Native/pal_timeZoneInfo.c#L77. Its basically calling
ucal_getTimeZoneDisplayName
(in the icu4c library) to take a calendar in a given local, and get a display name for the time zone.How can I do something equivalent in icu4x? I was expecting there might be some method of
Calendar
orDate
or maybeTimeZone
but I didn't see anything in the documentation. Are the concepts just too different to have a direct translation like this?Beta Was this translation helpful? Give feedback.
All reactions