Skip to content

Commit

Permalink
Merge branch 'main' into date-skeleton-lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Nov 28, 2024
2 parents 2f6b1bf + b5b45a5 commit 86ad93f
Show file tree
Hide file tree
Showing 675 changed files with 76,889 additions and 60,209 deletions.
262 changes: 213 additions & 49 deletions CHANGELOG.md

Large diffs are not rendered by default.

992 changes: 591 additions & 401 deletions Cargo.lock

Large diffs are not rendered by default.

118 changes: 59 additions & 59 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ exclude = [
]

[workspace.package]
version = "2.0.0-dev"
version = "2.0.0-beta1"
rust-version = "1.71.1"
authors = ["The ICU4X Project Developers"]
edition = "2021"
Expand All @@ -130,80 +130,80 @@ include = [

# ICU4X core
# These use non-tilde deps, see https://github.com/unicode-org/icu4x/issues/4343
icu_locale_core = { version = "2.0.0-dev", path = "components/locale_core", default-features = false }
icu_provider = { version = "2.0.0-dev", path = "provider/core", default-features = false }
icu_pattern = { version = "0.3.0-dev", path = "components/pattern", default-features = false }
icu_locale_core = { version = "2.0.0-beta1", path = "components/locale_core", default-features = false }
icu_provider = { version = "2.0.0-beta1", path = "provider/core", default-features = false }
icu_pattern = { version = "0.3.0", path = "components/pattern", default-features = false }

# Components
icu = { version = "~2.0.0-dev", path = "components/icu", default-features = false }
icu_calendar = { version = "~2.0.0-dev", path = "components/calendar", default-features = false }
icu_casemap = { version = "~2.0.0-dev", path = "components/casemap", default-features = false }
icu_collator = { version = "~2.0.0-dev", path = "components/collator", default-features = false }
icu_collections = { version = "~2.0.0-dev", path = "components/collections", default-features = false }
icu_codepointtrie_builder = { version = "~0.4.0-dev", path = "components/collections/codepointtrie_builder", default-features = false }
icu_datetime = { version = "~2.0.0-dev", path = "components/datetime", default-features = false }
icu_decimal = { version = "~2.0.0-dev", path = "components/decimal", default-features = false }
icu_experimental = { version = "~0.2.0-dev", path = "components/experimental", default-features = false }
icu_list = { version = "~2.0.0-dev", path = "components/list", default-features = false }
icu_locale = { version = "~2.0.0-dev", path = "components/locale", default-features = false }
icu_normalizer = { version = "~2.0.0-dev", path = "components/normalizer", default-features = false }
icu_plurals = { version = "~2.0.0-dev", path = "components/plurals", default-features = false }
icu_properties = { version = "~2.0.0-dev", path = "components/properties", default-features = false }
icu_segmenter = { version = "~2.0.0-dev", path = "components/segmenter", default-features = false }
icu_timezone = { version = "~2.0.0-dev", path = "components/timezone", default-features = false }
icu = { version = "~2.0.0-beta1", path = "components/icu", default-features = false }
icu_calendar = { version = "~2.0.0-beta1", path = "components/calendar", default-features = false }
icu_casemap = { version = "~2.0.0-beta1", path = "components/casemap", default-features = false }
icu_collator = { version = "~2.0.0-beta1", path = "components/collator", default-features = false }
icu_collections = { version = "~2.0.0-beta1", path = "components/collections", default-features = false }
icu_codepointtrie_builder = { version = "~0.4.0", path = "components/collections/codepointtrie_builder", default-features = false }
icu_datetime = { version = "~2.0.0-beta1", path = "components/datetime", default-features = false }
icu_decimal = { version = "~2.0.0-beta1", path = "components/decimal", default-features = false }
icu_experimental = { version = "~0.2.0", path = "components/experimental", default-features = false }
icu_list = { version = "~2.0.0-beta1", path = "components/list", default-features = false }
icu_locale = { version = "~2.0.0-beta1", path = "components/locale", default-features = false }
icu_normalizer = { version = "~2.0.0-beta1", path = "components/normalizer", default-features = false }
icu_plurals = { version = "~2.0.0-beta1", path = "components/plurals", default-features = false }
icu_properties = { version = "~2.0.0-beta1", path = "components/properties", default-features = false }
icu_segmenter = { version = "~2.0.0-beta1", path = "components/segmenter", default-features = false }
icu_timezone = { version = "~2.0.0-beta1", path = "components/timezone", default-features = false }

# FFI
icu_capi = { version = "~2.0.0-dev", path = "ffi/capi", default-features = false }
icu_capi = { version = "~2.0.0-beta1", path = "ffi/capi", default-features = false }
# icu4x_ecma402 never used as a dep
# icu_freertos never used as a dep
# icu_harfbuzz never used as a dep

# Provider
icu_provider_export = { version = "~2.0.0-dev", path = "provider/export", default-features = false }
icu_provider_source = { version = "~2.0.0-dev", path = "provider/source", default-features = false }
icu_provider_macros = { version = "~2.0.0-dev", path = "provider/core/macros", default-features = false }
icu_provider_adapters = { version = "~2.0.0-dev", path = "provider/adapters", default-features = false }
icu_provider_baked = { version = "~2.0.0-dev", path = "provider/baked", default-features = false }
icu_provider_blob = { version = "~2.0.0-dev", path = "provider/blob", default-features = false }
icu_provider_fs = { version = "~2.0.0-dev", path = "provider/fs", default-features = false }
icu_provider_registry = { version = "~2.0.0-dev", path = "provider/registry", default-features = false }
icu_provider_export = { version = "~2.0.0-beta1", path = "provider/export", default-features = false }
icu_provider_source = { version = "~2.0.0-beta1", path = "provider/source", default-features = false }
icu_provider_macros = { version = "~2.0.0-beta1", path = "provider/core/macros", default-features = false }
icu_provider_adapters = { version = "~2.0.0-beta1", path = "provider/adapters", default-features = false }
icu_provider_baked = { version = "~2.0.0-beta1", path = "provider/baked", default-features = false }
icu_provider_blob = { version = "~2.0.0-beta1", path = "provider/blob", default-features = false }
icu_provider_fs = { version = "~2.0.0-beta1", path = "provider/fs", default-features = false }
icu_provider_registry = { version = "~2.0.0-beta1", path = "provider/registry", default-features = false }

# Baked data
icu_calendar_data = { version = "~2.0.0-dev", path = "provider/data/calendar", default-features = false }
icu_casemap_data = { version = "~2.0.0-dev", path = "provider/data/casemap", default-features = false }
icu_collator_data = { version = "~2.0.0-dev", path = "provider/data/collator", default-features = false }
icu_datetime_data = { version = "~2.0.0-dev", path = "provider/data/datetime", default-features = false }
icu_decimal_data = { version = "~2.0.0-dev", path = "provider/data/decimal", default-features = false }
icu_list_data = { version = "~2.0.0-dev", path = "provider/data/list", default-features = false }
icu_locale_data = { version = "~2.0.0-dev", path = "provider/data/locale", default-features = false }
icu_normalizer_data = { version = "~2.0.0-dev", path = "provider/data/normalizer", default-features = false }
icu_plurals_data = { version = "~2.0.0-dev", path = "provider/data/plurals", default-features = false }
icu_properties_data = { version = "~2.0.0-dev", path = "provider/data/properties", default-features = false }
icu_segmenter_data = { version = "~2.0.0-dev", path = "provider/data/segmenter", default-features = false }
icu_timezone_data = { version = "~2.0.0-dev", path = "provider/data/timezone", default-features = false }
icu_calendar_data = { version = "~2.0.0-beta1", path = "provider/data/calendar", default-features = false }
icu_casemap_data = { version = "~2.0.0-beta1", path = "provider/data/casemap", default-features = false }
icu_collator_data = { version = "~2.0.0-beta1", path = "provider/data/collator", default-features = false }
icu_datetime_data = { version = "~2.0.0-beta1", path = "provider/data/datetime", default-features = false }
icu_decimal_data = { version = "~2.0.0-beta1", path = "provider/data/decimal", default-features = false }
icu_list_data = { version = "~2.0.0-beta1", path = "provider/data/list", default-features = false }
icu_locale_data = { version = "~2.0.0-beta1", path = "provider/data/locale", default-features = false }
icu_normalizer_data = { version = "~2.0.0-beta1", path = "provider/data/normalizer", default-features = false }
icu_plurals_data = { version = "~2.0.0-beta1", path = "provider/data/plurals", default-features = false }
icu_properties_data = { version = "~2.0.0-beta1", path = "provider/data/properties", default-features = false }
icu_segmenter_data = { version = "~2.0.0-beta1", path = "provider/data/segmenter", default-features = false }
icu_timezone_data = { version = "~2.0.0-beta1", path = "provider/data/timezone", default-features = false }
icu_experimental_data = { version = "~0.2.0-dev", path = "provider/data/experimental", default-features = false }

# Utils
bies = { version = "0.2.2", path = "utils/bies", default-features = false }
calendrical_calculations = { version = "0.1.1", path = "utils/calendrical_calculations", default-features = false }
crlify = { version = "1.0.4", path = "utils/crlify", default-features = false }
databake = { version = "0.1.9-dev", path = "utils/databake", default-features = false }
databake-derive = { version = "0.1.8", path = "utils/databake/derive", default-features = false }
databake = { version = "0.2.0", path = "utils/databake", default-features = false }
databake-derive = { version = "0.2.0", path = "utils/databake/derive", default-features = false }
deduplicating_array = { version = "0.1.6", path = "utils/deduplicating_array", default-features = false }
fixed_decimal = { version = "0.6.0-dev", path = "utils/fixed_decimal", default-features = false }
ixdtf = { version = "0.3.0-dev", path = "utils/ixdtf", default-features = false }
fixed_decimal = { version = "0.6.0", path = "utils/fixed_decimal", default-features = false }
ixdtf = { version = "0.3.0", path = "utils/ixdtf", default-features = false }
litemap = { version = "0.7.3", path = "utils/litemap", default-features = false }
tinystr = { version = "0.8.0-dev", path = "utils/tinystr", default-features = false }
tzif = { version = "0.3.0-dev", path = "utils/tzif", default-features = false }
potential_utf = { version = "0.1.0-dev", path = "utils/potential_utf", default-features = false }
writeable = { version = "0.5.6-dev", path = "utils/writeable", default-features = false }
yoke = { version = "0.7.5-dev", path = "utils/yoke", default-features = false }
yoke-derive = { version = "0.7.4", path = "utils/yoke/derive", default-features = false }
tinystr = { version = "0.8.0", path = "utils/tinystr", default-features = false }
tzif = { version = "0.3.0", path = "utils/tzif", default-features = false }
potential_utf = { version = "0.1.0", path = "utils/potential_utf", default-features = false }
writeable = { version = "0.6.0", path = "utils/writeable", default-features = false }
yoke = { version = "0.7.5", path = "utils/yoke", default-features = false }
yoke-derive = { version = "0.7.5", path = "utils/yoke/derive", default-features = false }
zerofrom = { version = "0.1.3", path = "utils/zerofrom", default-features = false }
zerofrom-derive = { version = "0.1.3", path = "utils/zerofrom/derive", default-features = false }
zerotrie = { version = "0.2.0-dev", path = "utils/zerotrie", default-features = false }
zerovec = { version = "0.11.0-dev", path = "utils/zerovec", default-features = false }
zerovec-derive = { version = "0.11.0-dev", path = "utils/zerovec/derive", default-features = false }
zerotrie = { version = "0.2.0", path = "utils/zerotrie", default-features = false }
zerovec = { version = "0.11.0", path = "utils/zerovec", default-features = false }
zerovec-derive = { version = "0.11.0", path = "utils/zerovec/derive", default-features = false }

# Tools
icu_benchmark_macros = { path = "tools/benchmark/macros" }
Expand All @@ -213,10 +213,10 @@ icu_benchmark_macros = { path = "tools/benchmark/macros" }

# The version here can either be a `version = ".."` spec or `git = "https://github.com/rust-diplomat/diplomat", rev = ".."`
# Diplomat must be published preceding a new ICU4X release but may use git versions in between
diplomat = { git = "https://github.com/rust-diplomat/diplomat", rev = "b49d63ec2a50a456b4b6e9d072d3650dca153ff8" }
diplomat-runtime = { git = "https://github.com/rust-diplomat/diplomat", rev = "b49d63ec2a50a456b4b6e9d072d3650dca153ff8" }
diplomat_core = { git = "https://github.com/rust-diplomat/diplomat", rev = "b49d63ec2a50a456b4b6e9d072d3650dca153ff8" }
diplomat-tool = { git = "https://github.com/rust-diplomat/diplomat", rev = "b49d63ec2a50a456b4b6e9d072d3650dca153ff8" }
diplomat = { version = "0.9.0", default-features = false }
diplomat-runtime = { version = "0.9.0", default-features = false }
diplomat_core = { version = "0.9.0", default-features = false }
diplomat-tool = { version = "0.9.0", default-features = false }

# EXTERNAL DEPENDENCIES
#
Expand Down Expand Up @@ -249,7 +249,7 @@ memchr = { version = "2.6.0", default-features = false }
num-bigint = { version = "0.4.3", default-features = false }
num-rational = { version = "0.4.0", default-features = false }
num-traits = { version = "0.2.0", default-features = false }
postcard = { version = "1.0.1", default-features = false }
postcard = { version = "1.0.3", default-features = false }
regex-automata = { version = "0.4.7", default-features = false }
ryu = { version = "1.0.5", default-features = false }
serde = { version = "1.0.110", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ icu = "1.5.0"

```rust
use icu::calendar::DateTime;
use icu::datetime::{DateTimeFormatter, NeoSkeletonLength, fieldset::YMDT};
use icu::datetime::{DateTimeFormatter, Length, fieldsets::YMDT};
use icu::locale::locale;

let dtf = DateTimeFormatter::try_new(
&locale!("es").into(),
locale!("es").into(),
YMDT::long()
)
.expect("locale should be present in compiled data");

let date = DateTime::try_new_iso(2020, 9, 12, 12, 35, 0).expect("datetime should be valid");
let date = date.to_any();

let formatted_date = dtf.convert_and_format(&date).to_string_lossy();
let formatted_date = dtf.format_any_calendar(&date).to_string();
assert_eq!(
formatted_date,
"12 de septiembre de 2020, 12:35:00"
Expand Down
Loading

0 comments on commit 86ad93f

Please sign in to comment.