Skip to content

Commit

Permalink
Time zone renames (#6123)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Feb 14, 2025
1 parent f8484f3 commit 0b8985f
Show file tree
Hide file tree
Showing 195 changed files with 2,508 additions and 2,581 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ components/locale_core/ @zbraniecki @nciric
components/normalizer/ @hsivonen @echeran
components/plurals/ @zbraniecki @sffc
components/segmenter/ @aethanyc @makotokato @sffc
components/timezone/ @nekevss @robertbastian @sffc
components/time/ @nekevss @robertbastian @sffc
tutorials/gn/ @sffc
ffi/capi/ @Manishearth
ffi/ecma402/ @filmil
Expand Down
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ members = [
"components/plurals",
"components/properties",
"components/segmenter",
"components/timezone",
"components/time",

# FFI
"ffi/capi",
Expand Down Expand Up @@ -59,7 +59,7 @@ members = [
"provider/data/plurals",
"provider/data/properties",
"provider/data/segmenter",
"provider/data/timezone",
"provider/data/time",

# Utils
"utils/bies",
Expand Down Expand Up @@ -151,7 +151,7 @@ icu_normalizer = { version = "~2.0.0-beta1", path = "components/normalizer", def
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 }
icu_time = { version = "~2.0.0-beta1", path = "components/time", default-features = false }

# FFI
icu_capi = { version = "~2.0.0-beta1", path = "ffi/capi", default-features = false }
Expand Down Expand Up @@ -181,7 +181,7 @@ icu_normalizer_data = { version = "~2.0.0-beta1", path = "provider/data/normaliz
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_time_data = { version = "~2.0.0-beta1", path = "provider/data/time", default-features = false }
icu_experimental_data = { version = "~0.2.0-dev", path = "provider/data/experimental", default-features = false }

# Utils
Expand Down
10 changes: 5 additions & 5 deletions components/datetime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ icu_locale_core = { workspace = true }
icu_pattern = { workspace = true, features = ["zerovec", "alloc"] }
icu_plurals = { workspace = true }
icu_provider = { workspace = true, features = ["macros"] }
icu_timezone = { workspace = true }
icu_time = { workspace = true }
smallvec = { workspace = true }
tinystr = { workspace = true, features = ["alloc", "zerovec"] }
potential_utf = { workspace = true, features = ["alloc", "zerovec"] }
Expand All @@ -50,7 +50,7 @@ icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
icu_calendar = { path = "../calendar", features = ["ixdtf"] }
icu_provider_adapters = { path = "../../provider/adapters" }
icu_provider_blob = { path = "../../provider/blob", features = ["alloc"] }
icu_timezone = { path = "../timezone", features = ["ixdtf"] }
icu_time = { path = "../time", features = ["ixdtf"] }
litemap = { path = "../../utils/litemap" }

serde = { workspace = true, features = ["derive"] }
Expand All @@ -71,7 +71,7 @@ serde = [
"icu_plurals/serde",
"icu_provider/alloc",
"icu_provider/serde",
"icu_timezone/serde",
"icu_time/serde",
"litemap?/serde",
"smallvec/serde",
"tinystr/serde",
Expand All @@ -84,12 +84,12 @@ datagen = [
"icu_calendar/datagen",
"icu_pattern/databake",
"icu_plurals/datagen",
"icu_timezone/datagen",
"icu_time/datagen",
"serde",
]
logging = ["icu_calendar/logging"]
experimental = ["dep:litemap"]
compiled_data = ["dep:icu_datetime_data", "icu_calendar/compiled_data", "icu_decimal/compiled_data", "icu_plurals/compiled_data", "icu_timezone/compiled_data"]
compiled_data = ["dep:icu_datetime_data", "icu_calendar/compiled_data", "icu_decimal/compiled_data", "icu_plurals/compiled_data", "icu_time/compiled_data"]

[lib]
bench = false # This option is required for Benchmark CI
Expand Down
12 changes: 6 additions & 6 deletions components/datetime/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions components/datetime/benches/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use icu_datetime::FixedCalendarDateTimeFormatter;

use icu_calendar::{Date, Gregorian};
use icu_locale_core::Locale;
use icu_timezone::{DateTime, Time, TimeZoneInfo, ZoneVariant, ZonedDateTime};
use icu_time::{zone::TimeZoneVariant, DateTime, Time, TimeZoneInfo, ZonedDateTime};
use writeable::Writeable;

#[path = "../tests/mock.rs"]
Expand Down Expand Up @@ -41,7 +41,7 @@ fn datetime_benches(c: &mut Criterion) {
Date::try_new_iso(2024, 1, 1).unwrap(),
Time::midnight(),
))
.with_zone_variant(ZoneVariant::Standard),
.with_zone_variant(TimeZoneVariant::Standard),
}
}
})
Expand Down
6 changes: 3 additions & 3 deletions components/datetime/examples/timezone_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ use std::collections::BTreeMap;
use icu::calendar::Date;
use icu::datetime::{fieldsets, TimeFormatter};
use icu::locale::locale;
use icu::timezone::Time;
use icu::time::Time;

fn main() {
let mapper = icu::timezone::TimeZoneIdMapper::new();
let offsets = icu::timezone::ZoneOffsetCalculator::new();
let mapper = icu::time::zone::IanaParser::new();
let offsets = icu::time::zone::UtcOffsetCalculator::new();

let prefs = locale!("en").into();

Expand Down
2 changes: 1 addition & 1 deletion components/datetime/examples/work_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use icu_benchmark_macros::println;
use icu_calendar::Date;
use icu_datetime::{fieldsets::YMDT, FixedCalendarDateTimeFormatter};
use icu_locale_core::locale;
use icu_timezone::{DateTime, Time};
use icu_time::{DateTime, Time};

const DATES_ISO: &[(i32, u8, u8, u8, u8, u8)] = &[
(2001, 9, 8, 18, 46, 40),
Expand Down
18 changes: 9 additions & 9 deletions components/datetime/src/combo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use crate::{provider::neo::*, scaffold::*};
/// use icu::datetime::DateTimeFormatter;
/// use icu::locale::locale;
/// use icu::datetime::input::ZonedDateTime;
/// use icu::timezone::TimeZoneIdMapper;
/// use icu::time::zone::IanaParser;
/// use writeable::assert_writeable_eq;
///
/// // Note: Combo type can be elided, but it is shown here for demonstration
Expand All @@ -39,7 +39,7 @@ use crate::{provider::neo::*, scaffold::*};
/// let zdt = ZonedDateTime::try_location_only_from_str(
/// "2024-10-18T15:44[America/Los_Angeles]",
/// formatter.calendar(),
/// TimeZoneIdMapper::new(),
/// IanaParser::new(),
/// )
/// .unwrap();
///
Expand All @@ -57,7 +57,7 @@ use crate::{provider::neo::*, scaffold::*};
/// use icu::datetime::FixedCalendarDateTimeFormatter;
/// use icu::locale::locale;
/// use icu::datetime::input::ZonedDateTime;
/// use icu::timezone::TimeZoneIdMapper;
/// use icu::time::zone::IanaParser;
/// use writeable::assert_writeable_eq;
///
/// // Note: Combo type can be elided, but it is shown here for demonstration
Expand All @@ -67,7 +67,7 @@ use crate::{provider::neo::*, scaffold::*};
/// )
/// .unwrap();
///
/// let zdt = ZonedDateTime::try_location_only_from_str("2024-10-18T15:44[America/Los_Angeles]", Gregorian, TimeZoneIdMapper::new())
/// let zdt = ZonedDateTime::try_location_only_from_str("2024-10-18T15:44[America/Los_Angeles]", Gregorian, IanaParser::new())
/// .unwrap();
///
/// assert_writeable_eq!(
Expand All @@ -84,7 +84,7 @@ use crate::{provider::neo::*, scaffold::*};
/// use icu::datetime::DateTimeFormatter;
/// use icu::locale::locale;
/// use icu::datetime::input::ZonedDateTime;
/// use icu::timezone::TimeZoneIdMapper;
/// use icu::time::zone::IanaParser;
/// use writeable::assert_writeable_eq;
///
/// // Note: Combo type can be elided, but it is shown here for demonstration
Expand All @@ -97,7 +97,7 @@ use crate::{provider::neo::*, scaffold::*};
/// let zdt = ZonedDateTime::try_location_only_from_str(
/// "2024-10-18T15:44[America/Los_Angeles]",
/// formatter.calendar(),
/// TimeZoneIdMapper::new(),
/// IanaParser::new(),
/// )
/// .unwrap();
///
Expand All @@ -115,7 +115,7 @@ use crate::{provider::neo::*, scaffold::*};
/// use icu::datetime::FixedCalendarDateTimeFormatter;
/// use icu::locale::locale;
/// use icu::datetime::input::ZonedDateTime;
/// use icu::timezone::{ZoneOffsetCalculator, TimeZoneIdMapper};
/// use icu::time::zone::{UtcOffsetCalculator, IanaParser};
/// use writeable::assert_writeable_eq;
///
/// let formatter = FixedCalendarDateTimeFormatter::try_new(
Expand All @@ -127,8 +127,8 @@ use crate::{provider::neo::*, scaffold::*};
/// let zdt = ZonedDateTime::try_from_str(
/// "2024-10-18T15:44-0700[America/Los_Angeles]",
/// Gregorian,
/// TimeZoneIdMapper::new(),
/// &ZoneOffsetCalculator::new(),
/// IanaParser::new(),
/// &UtcOffsetCalculator::new(),
/// )
/// .unwrap();
///
Expand Down
Loading

0 comments on commit 0b8985f

Please sign in to comment.