mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 10:17:23 +00:00
ICU-6422 ignore tags in locales
X-SVN-Rev: 24440
This commit is contained in:
parent
0c2a587a9c
commit
bd5fddc33f
2 changed files with 10 additions and 0 deletions
|
@ -236,4 +236,8 @@ public class ICUDurationTest extends TestFmwk {
|
|||
}
|
||||
}
|
||||
|
||||
public void TestResourceWithCalendar() {
|
||||
DurationFormat df = DurationFormat.getInstance(new ULocale("th@calendar=buddhist"));
|
||||
// should pass, but return a default formatter for th.
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,6 +74,12 @@ public class ResourceBasedPeriodFormatterDataService
|
|||
}
|
||||
|
||||
public PeriodFormatterData get(String localeName) {
|
||||
// remove tag info including calendar, we don't use the calendar
|
||||
int x = localeName.indexOf('@');
|
||||
if (x != -1) {
|
||||
localeName = localeName.substring(0, x);
|
||||
}
|
||||
|
||||
synchronized(this) {
|
||||
if (lastLocale != null && lastLocale.equals(localeName)) {
|
||||
return lastData;
|
||||
|
|
Loading…
Add table
Reference in a new issue