Skip to content

Commit de86b32

Browse files
committed
ICU-22723 Integrate CLDR 46 release beta3, part 3, source files
1 parent 17687bf commit de86b32

File tree

4 files changed

+178
-73
lines changed

4 files changed

+178
-73
lines changed

icu4c/source/i18n/measunit.cpp

Lines changed: 61 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,24 @@ static const int32_t gOffsets[] = {
4343
17,
4444
27,
4545
31,
46-
332,
47-
343,
48-
360,
49-
364,
50-
373,
51-
376,
52-
380,
53-
388,
54-
410,
55-
414,
56-
429,
57-
430,
58-
436,
59-
447,
60-
452,
61-
456,
62-
458,
63-
492
46+
333,
47+
344,
48+
362,
49+
366,
50+
375,
51+
378,
52+
382,
53+
390,
54+
412,
55+
416,
56+
431,
57+
432,
58+
438,
59+
449,
60+
455,
61+
459,
62+
461,
63+
495
6464
};
6565

6666
static const int32_t kCurrencyOffset = 5;
@@ -423,6 +423,7 @@ static const char * const gSubTypes[] = {
423423
"ZRZ",
424424
"ZWC",
425425
"ZWD",
426+
"ZWG",
426427
"ZWL",
427428
"ZWN",
428429
"ZWR",
@@ -448,6 +449,7 @@ static const char * const gSubTypes[] = {
448449
"month",
449450
"month-person",
450451
"nanosecond",
452+
"night",
451453
"quarter",
452454
"second",
453455
"week",
@@ -544,6 +546,7 @@ static const char * const gSubTypes[] = {
544546
"beaufort",
545547
"kilometer-per-hour",
546548
"knot",
549+
"light-speed",
547550
"meter-per-second",
548551
"mile-per-hour",
549552
"celsius",
@@ -1016,54 +1019,62 @@ MeasureUnit MeasureUnit::getNanosecond() {
10161019
return MeasureUnit(7, 10);
10171020
}
10181021

1019-
MeasureUnit *MeasureUnit::createQuarter(UErrorCode &status) {
1022+
MeasureUnit *MeasureUnit::createNight(UErrorCode &status) {
10201023
return MeasureUnit::create(7, 11, status);
10211024
}
10221025

1023-
MeasureUnit MeasureUnit::getQuarter() {
1026+
MeasureUnit MeasureUnit::getNight() {
10241027
return MeasureUnit(7, 11);
10251028
}
10261029

1027-
MeasureUnit *MeasureUnit::createSecond(UErrorCode &status) {
1030+
MeasureUnit *MeasureUnit::createQuarter(UErrorCode &status) {
10281031
return MeasureUnit::create(7, 12, status);
10291032
}
10301033

1031-
MeasureUnit MeasureUnit::getSecond() {
1034+
MeasureUnit MeasureUnit::getQuarter() {
10321035
return MeasureUnit(7, 12);
10331036
}
10341037

1035-
MeasureUnit *MeasureUnit::createWeek(UErrorCode &status) {
1038+
MeasureUnit *MeasureUnit::createSecond(UErrorCode &status) {
10361039
return MeasureUnit::create(7, 13, status);
10371040
}
10381041

1039-
MeasureUnit MeasureUnit::getWeek() {
1042+
MeasureUnit MeasureUnit::getSecond() {
10401043
return MeasureUnit(7, 13);
10411044
}
10421045

1043-
MeasureUnit *MeasureUnit::createWeekPerson(UErrorCode &status) {
1046+
MeasureUnit *MeasureUnit::createWeek(UErrorCode &status) {
10441047
return MeasureUnit::create(7, 14, status);
10451048
}
10461049

1047-
MeasureUnit MeasureUnit::getWeekPerson() {
1050+
MeasureUnit MeasureUnit::getWeek() {
10481051
return MeasureUnit(7, 14);
10491052
}
10501053

1051-
MeasureUnit *MeasureUnit::createYear(UErrorCode &status) {
1054+
MeasureUnit *MeasureUnit::createWeekPerson(UErrorCode &status) {
10521055
return MeasureUnit::create(7, 15, status);
10531056
}
10541057

1055-
MeasureUnit MeasureUnit::getYear() {
1058+
MeasureUnit MeasureUnit::getWeekPerson() {
10561059
return MeasureUnit(7, 15);
10571060
}
10581061

1059-
MeasureUnit *MeasureUnit::createYearPerson(UErrorCode &status) {
1062+
MeasureUnit *MeasureUnit::createYear(UErrorCode &status) {
10601063
return MeasureUnit::create(7, 16, status);
10611064
}
10621065

1063-
MeasureUnit MeasureUnit::getYearPerson() {
1066+
MeasureUnit MeasureUnit::getYear() {
10641067
return MeasureUnit(7, 16);
10651068
}
10661069

1070+
MeasureUnit *MeasureUnit::createYearPerson(UErrorCode &status) {
1071+
return MeasureUnit::create(7, 17, status);
1072+
}
1073+
1074+
MeasureUnit MeasureUnit::getYearPerson() {
1075+
return MeasureUnit(7, 17);
1076+
}
1077+
10671078
MeasureUnit *MeasureUnit::createAmpere(UErrorCode &status) {
10681079
return MeasureUnit::create(8, 0, status);
10691080
}
@@ -1544,14 +1555,6 @@ MeasureUnit MeasureUnit::getKilogram() {
15441555
return MeasureUnit(15, 5);
15451556
}
15461557

1547-
MeasureUnit *MeasureUnit::createMetricTon(UErrorCode &status) {
1548-
return MeasureUnit::create(15, 14, status);
1549-
}
1550-
1551-
MeasureUnit MeasureUnit::getMetricTon() {
1552-
return MeasureUnit(15, 14);
1553-
}
1554-
15551558
MeasureUnit *MeasureUnit::createMicrogram(UErrorCode &status) {
15561559
return MeasureUnit::create(15, 6, status);
15571560
}
@@ -1624,6 +1627,14 @@ MeasureUnit MeasureUnit::getTonne() {
16241627
return MeasureUnit(15, 14);
16251628
}
16261629

1630+
MeasureUnit *MeasureUnit::createMetricTon(UErrorCode &status) {
1631+
return MeasureUnit::create(15, 14, status);
1632+
}
1633+
1634+
MeasureUnit MeasureUnit::getMetricTon() {
1635+
return MeasureUnit(15, 14);
1636+
}
1637+
16271638
MeasureUnit *MeasureUnit::createGigawatt(UErrorCode &status) {
16281639
return MeasureUnit::create(17, 0, status);
16291640
}
@@ -1784,22 +1795,30 @@ MeasureUnit MeasureUnit::getKnot() {
17841795
return MeasureUnit(19, 2);
17851796
}
17861797

1787-
MeasureUnit *MeasureUnit::createMeterPerSecond(UErrorCode &status) {
1798+
MeasureUnit *MeasureUnit::createLightSpeed(UErrorCode &status) {
17881799
return MeasureUnit::create(19, 3, status);
17891800
}
17901801

1791-
MeasureUnit MeasureUnit::getMeterPerSecond() {
1802+
MeasureUnit MeasureUnit::getLightSpeed() {
17921803
return MeasureUnit(19, 3);
17931804
}
17941805

1795-
MeasureUnit *MeasureUnit::createMilePerHour(UErrorCode &status) {
1806+
MeasureUnit *MeasureUnit::createMeterPerSecond(UErrorCode &status) {
17961807
return MeasureUnit::create(19, 4, status);
17971808
}
17981809

1799-
MeasureUnit MeasureUnit::getMilePerHour() {
1810+
MeasureUnit MeasureUnit::getMeterPerSecond() {
18001811
return MeasureUnit(19, 4);
18011812
}
18021813

1814+
MeasureUnit *MeasureUnit::createMilePerHour(UErrorCode &status) {
1815+
return MeasureUnit::create(19, 5, status);
1816+
}
1817+
1818+
MeasureUnit MeasureUnit::getMilePerHour() {
1819+
return MeasureUnit(19, 5);
1820+
}
1821+
18031822
MeasureUnit *MeasureUnit::createCelsius(UErrorCode &status) {
18041823
return MeasureUnit::create(20, 0, status);
18051824
}

icu4c/source/i18n/unicode/measunit.h

Lines changed: 60 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,6 +1568,24 @@ class U_I18N_API MeasureUnit: public UObject {
15681568
*/
15691569
static MeasureUnit getNanosecond();
15701570

1571+
#ifndef U_HIDE_DRAFT_API
1572+
/**
1573+
* Returns by pointer, unit of duration: night.
1574+
* Caller owns returned value and must free it.
1575+
* Also see {@link #getNight()}.
1576+
* @param status ICU error code.
1577+
* @draft ICU 76
1578+
*/
1579+
static MeasureUnit *createNight(UErrorCode &status);
1580+
1581+
/**
1582+
* Returns by value, unit of duration: night.
1583+
* Also see {@link #createNight()}.
1584+
* @draft ICU 76
1585+
*/
1586+
static MeasureUnit getNight();
1587+
#endif /* U_HIDE_DRAFT_API */
1588+
15711589
/**
15721590
* Returns by pointer, unit of duration: quarter.
15731591
* Caller owns returned value and must free it.
@@ -2624,30 +2642,6 @@ class U_I18N_API MeasureUnit: public UObject {
26242642
*/
26252643
static MeasureUnit getKilogram();
26262644

2627-
/**
2628-
* Returns by pointer, unit of mass: metric-ton
2629-
* (renamed to tonne in CLDR 42 / ICU 72).
2630-
* Caller owns returned value and must free it.
2631-
* Note: In ICU 74 this will be deprecated in favor of
2632-
* createTonne(), which is currently draft but will
2633-
* become stable in ICU 74, and which uses the preferred naming.
2634-
* Also see {@link #getMetricTon()} and {@link #createTonne()}.
2635-
* @param status ICU error code.
2636-
* @stable ICU 54
2637-
*/
2638-
static MeasureUnit *createMetricTon(UErrorCode &status);
2639-
2640-
/**
2641-
* Returns by value, unit of mass: metric-ton
2642-
* (renamed to tonne in CLDR 42 / ICU 72).
2643-
* Note: In ICU 74 this will be deprecated in favor of
2644-
* getTonne(), which is currently draft but will
2645-
* become stable in ICU 74, and which uses the preferred naming.
2646-
* Also see {@link #createMetricTon()} and {@link #getTonne()}.
2647-
* @stable ICU 64
2648-
*/
2649-
static MeasureUnit getMetricTon();
2650-
26512645
/**
26522646
* Returns by pointer, unit of mass: microgram.
26532647
* Caller owns returned value and must free it.
@@ -2792,6 +2786,30 @@ class U_I18N_API MeasureUnit: public UObject {
27922786
*/
27932787
static MeasureUnit getTonne();
27942788

2789+
/**
2790+
* Returns by pointer, unit of mass: metric-ton
2791+
* (renamed to tonne in CLDR 42 / ICU 72).
2792+
* Caller owns returned value and must free it.
2793+
* Note: In ICU 74 this will be deprecated in favor of
2794+
* createTonne(), which is currently draft but will
2795+
* become stable in ICU 74, and which uses the preferred naming.
2796+
* Also see {@link #getMetricTon()} and {@link #createTonne()}.
2797+
* @param status ICU error code.
2798+
* @stable ICU 54
2799+
*/
2800+
static MeasureUnit *createMetricTon(UErrorCode &status);
2801+
2802+
/**
2803+
* Returns by value, unit of mass: metric-ton
2804+
* (renamed to tonne in CLDR 42 / ICU 72).
2805+
* Note: In ICU 74 this will be deprecated in favor of
2806+
* getTonne(), which is currently draft but will
2807+
* become stable in ICU 74, and which uses the preferred naming.
2808+
* Also see {@link #createMetricTon()} and {@link #getTonne()}.
2809+
* @stable ICU 64
2810+
*/
2811+
static MeasureUnit getMetricTon();
2812+
27952813
/**
27962814
* Returns by pointer, unit of power: gigawatt.
27972815
* Caller owns returned value and must free it.
@@ -3112,6 +3130,24 @@ class U_I18N_API MeasureUnit: public UObject {
31123130
*/
31133131
static MeasureUnit getKnot();
31143132

3133+
#ifndef U_HIDE_DRAFT_API
3134+
/**
3135+
* Returns by pointer, unit of speed: light-speed.
3136+
* Caller owns returned value and must free it.
3137+
* Also see {@link #getLightSpeed()}.
3138+
* @param status ICU error code.
3139+
* @draft ICU 76
3140+
*/
3141+
static MeasureUnit *createLightSpeed(UErrorCode &status);
3142+
3143+
/**
3144+
* Returns by value, unit of speed: light-speed.
3145+
* Also see {@link #createLightSpeed()}.
3146+
* @draft ICU 76
3147+
*/
3148+
static MeasureUnit getLightSpeed();
3149+
#endif /* U_HIDE_DRAFT_API */
3150+
31153151
/**
31163152
* Returns by pointer, unit of speed: meter-per-second.
31173153
* Caller owns returned value and must free it.

0 commit comments

Comments
 (0)