icu4x 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Cargo.lock +2 -2
- data/ext/icu4x/Cargo.toml +1 -1
- data/ext/icu4x/src/datetime_format.rs +11 -5
- data/ext/icu4x_macros/Cargo.toml +1 -1
- data/lib/icu4x/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92daa8435d68948c86d3203cf5264b5487ce22fe768e36b1fca7e50a9bb996cf
|
|
4
|
+
data.tar.gz: 57de206ee12dc86ddabbaf8eac52b91904a2df596f3e11a618ddf451ab987125
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5da95f0c0491a3ed53d1d6a52b21acdbd0c0f4a6c6771bf8fcccf64edce6b44c81e636a49baa9b086b0c364c01c39653b4e0fc4aa3b2f8158b77dabab50a3a27
|
|
7
|
+
data.tar.gz: 9e75af1a9e8456ae07a4e0fc368733bf0b91d1bfde2aebc1eb0cecc2bac816f5926979b97ae82ee66b2eeaf41dbf2b3e70b75da8ecf067d5dce2b268c3b974a1
|
data/CHANGELOG.md
CHANGED
data/Cargo.lock
CHANGED
|
@@ -405,7 +405,7 @@ dependencies = [
|
|
|
405
405
|
|
|
406
406
|
[[package]]
|
|
407
407
|
name = "icu4x"
|
|
408
|
-
version = "0.11.
|
|
408
|
+
version = "0.11.2"
|
|
409
409
|
dependencies = [
|
|
410
410
|
"fixed_decimal",
|
|
411
411
|
"icu",
|
|
@@ -425,7 +425,7 @@ dependencies = [
|
|
|
425
425
|
|
|
426
426
|
[[package]]
|
|
427
427
|
name = "icu4x_macros"
|
|
428
|
-
version = "0.11.
|
|
428
|
+
version = "0.11.2"
|
|
429
429
|
dependencies = [
|
|
430
430
|
"proc-macro2",
|
|
431
431
|
"quote",
|
data/ext/icu4x/Cargo.toml
CHANGED
|
@@ -599,11 +599,17 @@ impl DateTimeFormat {
|
|
|
599
599
|
) -> CompositeFieldSet {
|
|
600
600
|
match (date_style, time_style) {
|
|
601
601
|
(Some(ds), Some(ts)) => {
|
|
602
|
-
// Both date and time
|
|
603
|
-
let ymdt = match
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
602
|
+
// Both date and time; date_style determines length
|
|
603
|
+
let ymdt = match ds {
|
|
604
|
+
DateStyle::Full | DateStyle::Long => fieldsets::YMDT::long(),
|
|
605
|
+
DateStyle::Medium => fieldsets::YMDT::medium(),
|
|
606
|
+
DateStyle::Short => fieldsets::YMDT::short(),
|
|
607
|
+
};
|
|
608
|
+
// short time_style suppresses seconds to match Intl.DateTimeFormat behavior
|
|
609
|
+
let ymdt = if ts == TimeStyle::Short {
|
|
610
|
+
ymdt.with_time_precision(TimePrecision::Minute)
|
|
611
|
+
} else {
|
|
612
|
+
ymdt
|
|
607
613
|
};
|
|
608
614
|
let ymdt = if let Some(s) = era { ymdt.with_year_style(s.to_icu_year_style()) } else { ymdt };
|
|
609
615
|
CompositeDateTimeFieldSet::DateTime(DateAndTimeFieldSet::YMDT(ymdt))
|
data/ext/icu4x_macros/Cargo.toml
CHANGED
data/lib/icu4x/version.rb
CHANGED