Skip to content

Commit fc2ad9c

Browse files
committed
Merge remote-tracking branch 'origin/main' into shorten-integer
2 parents 861faff + 85e83d6 commit fc2ad9c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1285
-640
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
- Compiled data updated to CLDR 45 and ICU 75 (unicode-org#4782)
88
- `icu_calendar`
99
- Consistently name calendar-specific `Date`/`DateTime` functions that have a calendar argument (https://github.com/unicode-org/icu4x/pull/5692)
10+
- Move all calendar types to `cal` module (https://github.com/unicode-org/icu4x/pull/5701)
1011
- Shorten integer types returned by `day_of_month()`, `week_of_month()`, and `week_of_year()` to `u8` (https://github.com/unicode-org/icu4x/pull/5702)
1112
- `icu_collections`
1213
- `icu_normalizer`
1314
- `icu_datetime`
1415
- `icu_experimental`
1516
- `icu_locale`
1617
- New crate
18+
- Allow `LocaleDirectionality` to wrap a `LocaleExpander` with user-controlled storage (https://github.com/unicode-org/icu4x/pull/5704)
1719
- `icu_locale_core`
1820
- New crate, renamed from `icu_locid`
1921
- Removed `Ord` and `PartialOrd` impl from `extensions::unicode::Unicode` (https://github.com/unicode-org/icu4x/pull/5617)

components/calendar/README.md

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/calendar/benches/convert.rs

+14-14
Original file line numberDiff line numberDiff line change
@@ -29,81 +29,81 @@ fn bench_calendar<C: Clone + Calendar>(
2929
fn convert_benches(c: &mut Criterion) {
3030
let mut group = c.benchmark_group("convert");
3131

32-
bench_calendar(&mut group, "calendar/iso", icu::calendar::iso::Iso);
32+
bench_calendar(&mut group, "calendar/iso", icu::calendar::cal::Iso);
3333

3434
#[cfg(feature = "bench")]
3535
bench_calendar(
3636
&mut group,
3737
"calendar/buddhist",
38-
icu::calendar::buddhist::Buddhist,
38+
icu::calendar::cal::Buddhist,
3939
);
4040

4141
#[cfg(feature = "bench")]
42-
bench_calendar(&mut group, "calendar/coptic", icu::calendar::coptic::Coptic);
42+
bench_calendar(&mut group, "calendar/coptic", icu::calendar::cal::Coptic);
4343

4444
#[cfg(feature = "bench")]
4545
bench_calendar(
4646
&mut group,
4747
"calendar/ethiopic",
48-
icu::calendar::ethiopian::Ethiopian::new(),
48+
icu::calendar::cal::Ethiopian::new(),
4949
);
5050

5151
#[cfg(feature = "bench")]
52-
bench_calendar(&mut group, "calendar/indian", icu::calendar::indian::Indian);
52+
bench_calendar(&mut group, "calendar/indian", icu::calendar::cal::Indian);
5353

5454
#[cfg(feature = "bench")]
55-
bench_calendar(&mut group, "calendar/julian", icu::calendar::julian::Julian);
55+
bench_calendar(&mut group, "calendar/julian", icu::calendar::cal::Julian);
5656

5757
#[cfg(feature = "bench")]
5858
bench_calendar(
5959
&mut group,
6060
"calendar/chinese_calculating",
61-
icu::calendar::chinese::Chinese::new_always_calculating(),
61+
icu::calendar::cal::Chinese::new_always_calculating(),
6262
);
6363

6464
#[cfg(feature = "bench")]
6565
bench_calendar(
6666
&mut group,
6767
"calendar/chinese_cached",
68-
icu::calendar::chinese::Chinese::new(),
68+
icu::calendar::cal::Chinese::new(),
6969
);
7070

7171
#[cfg(feature = "bench")]
7272
bench_calendar(
7373
&mut group,
7474
"calendar/gregorian",
75-
icu::calendar::gregorian::Gregorian,
75+
icu::calendar::cal::Gregorian,
7676
);
7777

7878
#[cfg(feature = "bench")]
79-
bench_calendar(&mut group, "calendar/hebrew", icu::calendar::hebrew::Hebrew);
79+
bench_calendar(&mut group, "calendar/hebrew", icu::calendar::cal::Hebrew);
8080

8181
#[cfg(feature = "bench")]
8282
bench_calendar(
8383
&mut group,
8484
"calendar/islamic/observational",
85-
icu::calendar::islamic::IslamicObservational::new_always_calculating(),
85+
icu::calendar::cal::IslamicObservational::new_always_calculating(),
8686
);
8787

8888
#[cfg(feature = "bench")]
8989
bench_calendar(
9090
&mut group,
9191
"calendar/islamic/civil",
92-
icu::calendar::islamic::IslamicCivil::new(),
92+
icu::calendar::cal::IslamicCivil::new(),
9393
);
9494

9595
#[cfg(feature = "bench")]
9696
bench_calendar(
9797
&mut group,
9898
"calendar/islamic/ummalqura",
99-
icu::calendar::islamic::IslamicUmmAlQura::new_always_calculating(),
99+
icu::calendar::cal::IslamicUmmAlQura::new_always_calculating(),
100100
);
101101

102102
#[cfg(feature = "bench")]
103103
bench_calendar(
104104
&mut group,
105105
"calendar/islamic/tabular",
106-
icu::calendar::islamic::IslamicTabular::new(),
106+
icu::calendar::cal::IslamicTabular::new(),
107107
);
108108

109109
group.finish();

components/calendar/benches/date.rs

+28-33
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fn date_benches(c: &mut Criterion) {
6161
&mut group,
6262
"calendar/overview",
6363
&fxs,
64-
icu::calendar::iso::Iso,
64+
icu::calendar::cal::Iso,
6565
|y, m, d| Date::try_new_iso(y, m, d).unwrap(),
6666
);
6767

@@ -70,7 +70,7 @@ fn date_benches(c: &mut Criterion) {
7070
&mut group,
7171
"calendar/buddhist",
7272
&fxs,
73-
icu::calendar::buddhist::Buddhist,
73+
icu::calendar::cal::Buddhist,
7474
|y, m, d| Date::try_new_buddhist(y, m, d).unwrap(),
7575
);
7676

@@ -79,7 +79,7 @@ fn date_benches(c: &mut Criterion) {
7979
&mut group,
8080
"calendar/coptic",
8181
&fxs,
82-
icu::calendar::coptic::Coptic,
82+
icu::calendar::cal::Coptic,
8383
|y, m, d| Date::try_new_coptic(y, m, d).unwrap(),
8484
);
8585

@@ -88,15 +88,10 @@ fn date_benches(c: &mut Criterion) {
8888
&mut group,
8989
"calendar/ethiopic",
9090
&fxs,
91-
icu::calendar::ethiopian::Ethiopian::new(),
91+
icu::calendar::cal::Ethiopian::new(),
9292
|y, m, d| {
93-
Date::try_new_ethiopian(
94-
icu::calendar::ethiopian::EthiopianEraStyle::AmeteMihret,
95-
y,
96-
m,
97-
d,
98-
)
99-
.unwrap()
93+
Date::try_new_ethiopian(icu::calendar::cal::EthiopianEraStyle::AmeteMihret, y, m, d)
94+
.unwrap()
10095
},
10196
);
10297

@@ -105,7 +100,7 @@ fn date_benches(c: &mut Criterion) {
105100
&mut group,
106101
"calendar/indian",
107102
&fxs,
108-
icu::calendar::indian::Indian,
103+
icu::calendar::cal::Indian,
109104
|y, m, d| Date::try_new_indian(y, m, d).unwrap(),
110105
);
111106

@@ -114,7 +109,7 @@ fn date_benches(c: &mut Criterion) {
114109
&mut group,
115110
"calendar/persian",
116111
&fxs,
117-
icu::calendar::persian::Persian,
112+
icu::calendar::cal::Persian,
118113
|y, m, d| Date::try_new_persian(y, m, d).unwrap(),
119114
);
120115

@@ -123,7 +118,7 @@ fn date_benches(c: &mut Criterion) {
123118
&mut group,
124119
"calendar/roc",
125120
&fxs,
126-
icu::calendar::roc::Roc,
121+
icu::calendar::cal::Roc,
127122
|y, m, d| Date::try_new_roc(y, m, d).unwrap(),
128123
);
129124

@@ -132,7 +127,7 @@ fn date_benches(c: &mut Criterion) {
132127
&mut group,
133128
"calendar/julian",
134129
&fxs,
135-
icu::calendar::julian::Julian,
130+
icu::calendar::cal::Julian,
136131
|y, m, d| Date::try_new_julian(y, m, d).unwrap(),
137132
);
138133

@@ -141,13 +136,13 @@ fn date_benches(c: &mut Criterion) {
141136
&mut group,
142137
"calendar/chinese_calculating",
143138
&fxs,
144-
icu::calendar::chinese::Chinese::new_always_calculating(),
139+
icu::calendar::cal::Chinese::new_always_calculating(),
145140
|y, m, d| {
146141
Date::try_new_chinese_with_calendar(
147142
y,
148143
m,
149144
d,
150-
icu::calendar::chinese::Chinese::new_always_calculating(),
145+
icu::calendar::cal::Chinese::new_always_calculating(),
151146
)
152147
.unwrap()
153148
},
@@ -158,9 +153,9 @@ fn date_benches(c: &mut Criterion) {
158153
&mut group,
159154
"calendar/chinese_cached",
160155
&fxs,
161-
icu::calendar::chinese::Chinese::new(),
156+
icu::calendar::cal::Chinese::new(),
162157
|y, m, d| {
163-
Date::try_new_chinese_with_calendar(y, m, d, icu::calendar::chinese::Chinese::new())
158+
Date::try_new_chinese_with_calendar(y, m, d, icu::calendar::cal::Chinese::new())
164159
.unwrap()
165160
},
166161
);
@@ -170,13 +165,13 @@ fn date_benches(c: &mut Criterion) {
170165
&mut group,
171166
"calendar/dangi_calculating",
172167
&fxs,
173-
icu::calendar::dangi::Dangi::new_always_calculating(),
168+
icu::calendar::cal::Dangi::new_always_calculating(),
174169
|y, m, d| {
175170
Date::try_new_dangi_with_calendar(
176171
y,
177172
m,
178173
d,
179-
icu::calendar::dangi::Dangi::new_always_calculating(),
174+
icu::calendar::cal::Dangi::new_always_calculating(),
180175
)
181176
.unwrap()
182177
},
@@ -187,9 +182,9 @@ fn date_benches(c: &mut Criterion) {
187182
&mut group,
188183
"calendar/dangi_cached",
189184
&fxs,
190-
icu::calendar::dangi::Dangi::new(),
185+
icu::calendar::cal::Dangi::new(),
191186
|y, m, d| {
192-
Date::try_new_dangi_with_calendar(y, m, d, icu::calendar::dangi::Dangi::new()).unwrap()
187+
Date::try_new_dangi_with_calendar(y, m, d, icu::calendar::cal::Dangi::new()).unwrap()
193188
},
194189
);
195190

@@ -198,7 +193,7 @@ fn date_benches(c: &mut Criterion) {
198193
&mut group,
199194
"calendar/hebrew",
200195
&fxs,
201-
icu::calendar::hebrew::Hebrew,
196+
icu::calendar::cal::Hebrew,
202197
|y, m, d| Date::try_new_hebrew(y, m, d).unwrap(),
203198
);
204199

@@ -207,7 +202,7 @@ fn date_benches(c: &mut Criterion) {
207202
&mut group,
208203
"calendar/gregorian",
209204
&fxs,
210-
icu::calendar::gregorian::Gregorian,
205+
icu::calendar::cal::Gregorian,
211206
|y, m, d| Date::try_new_gregorian(y, m, d).unwrap(),
212207
);
213208

@@ -216,13 +211,13 @@ fn date_benches(c: &mut Criterion) {
216211
&mut group,
217212
"calendar/islamic/civil",
218213
&fxs,
219-
icu::calendar::islamic::IslamicCivil::new(),
214+
icu::calendar::cal::IslamicCivil::new(),
220215
|y, m, d| {
221216
Date::try_new_islamic_civil_with_calendar(
222217
y,
223218
m,
224219
d,
225-
icu::calendar::islamic::IslamicCivil::new(),
220+
icu::calendar::cal::IslamicCivil::new(),
226221
)
227222
.unwrap()
228223
},
@@ -233,13 +228,13 @@ fn date_benches(c: &mut Criterion) {
233228
&mut group,
234229
"calendar/islamic/tabular",
235230
&fxs,
236-
icu::calendar::islamic::IslamicTabular::new(),
231+
icu::calendar::cal::IslamicTabular::new(),
237232
|y, m, d| {
238233
Date::try_new_islamic_tabular_with_calendar(
239234
y,
240235
m,
241236
d,
242-
icu::calendar::islamic::IslamicTabular::new(),
237+
icu::calendar::cal::IslamicTabular::new(),
243238
)
244239
.unwrap()
245240
},
@@ -250,13 +245,13 @@ fn date_benches(c: &mut Criterion) {
250245
&mut group,
251246
"calendar/islamic/ummalqura",
252247
&fxs,
253-
icu::calendar::islamic::IslamicUmmAlQura::new_always_calculating(),
248+
icu::calendar::cal::IslamicUmmAlQura::new_always_calculating(),
254249
|y, m, d| {
255250
Date::try_new_ummalqura_with_calendar(
256251
y,
257252
m,
258253
d,
259-
icu::calendar::islamic::IslamicUmmAlQura::new_always_calculating(),
254+
icu::calendar::cal::IslamicUmmAlQura::new_always_calculating(),
260255
)
261256
.unwrap()
262257
},
@@ -267,13 +262,13 @@ fn date_benches(c: &mut Criterion) {
267262
&mut group,
268263
"calendar/islamic/observational",
269264
&fxs,
270-
icu::calendar::islamic::IslamicObservational::new_always_calculating(),
265+
icu::calendar::cal::IslamicObservational::new_always_calculating(),
271266
|y, m, d| {
272267
Date::try_new_observational_islamic_with_calendar(
273268
y,
274269
m,
275270
d,
276-
icu::calendar::islamic::IslamicObservational::new_always_calculating(),
271+
icu::calendar::cal::IslamicObservational::new_always_calculating(),
277272
)
278273
.unwrap()
279274
},

0 commit comments

Comments
 (0)