diff --git a/components/datetime/src/neo_marker.rs b/components/datetime/src/neo_marker.rs index 5d6eb25b6fa..6c4c2276b0b 100644 --- a/components/datetime/src/neo_marker.rs +++ b/components/datetime/src/neo_marker.rs @@ -976,10 +976,8 @@ where T: HasConstTimeComponents, Z: HasConstZoneComponent, { - const COMPONENTS: NeoComponents = NeoComponents::DateTimeZone( - NeoDateTimeComponents::DateTime(D::COMPONENTS, T::COMPONENTS), - Z::COMPONENT, - ); + const COMPONENTS: NeoComponents = + NeoComponents::DateTimeZone(D::COMPONENTS, T::COMPONENTS, Z::COMPONENT); } impl DateTimeMarkers for DateTimeCombo diff --git a/components/datetime/src/neo_skeleton.rs b/components/datetime/src/neo_skeleton.rs index c4b3b198794..88c24468e02 100644 --- a/components/datetime/src/neo_skeleton.rs +++ b/components/datetime/src/neo_skeleton.rs @@ -709,16 +709,20 @@ impl From for NeoDateTimeComponents { #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[non_exhaustive] pub enum NeoComponents { - /// Components for parts of a date. + /// Components for a date. Date(NeoDateComponents), - /// Components for parts of a time. + /// Components for a time. Time(NeoTimeComponents), - /// Components for a time zone by itself. + /// Components for a time zone. Zone(NeoTimeZoneSkeleton), - /// Components for parts of a date and time together. + /// Components for a date and a time together. DateTime(NeoDayComponents, NeoTimeComponents), - /// Components for a date/time with a time zone. - DateTimeZone(NeoDateTimeComponents, NeoTimeZoneSkeleton), + /// Components for a date and a time zone together. + DateZone(NeoDateComponents, NeoTimeZoneSkeleton), + /// Components for a time and a time zone together. + TimeZone(NeoTimeComponents, NeoTimeZoneSkeleton), + /// Components for a date, a time, and a time zone together. + DateTimeZone(NeoDayComponents, NeoTimeComponents, NeoTimeZoneSkeleton), } impl From for NeoComponents { diff --git a/components/datetime/src/raw/neo.rs b/components/datetime/src/raw/neo.rs index 31da6fcfc32..b62042865e5 100644 --- a/components/datetime/src/raw/neo.rs +++ b/components/datetime/src/raw/neo.rs @@ -6,8 +6,8 @@ use crate::format::neo::FieldForDataLoading; use crate::input::ExtractedDateTimeInput; use crate::neo_pattern::DateTimePattern; use crate::neo_skeleton::{ - NeoComponents, NeoDateComponents, NeoDateSkeleton, NeoDateTimeComponents, NeoSkeletonLength, - NeoTimeComponents, NeoTimeSkeleton, NeoTimeZoneSkeleton, + NeoComponents, NeoDateComponents, NeoDateSkeleton, NeoSkeletonLength, NeoTimeComponents, + NeoTimeSkeleton, NeoTimeZoneSkeleton, }; use crate::pattern::runtime::PatternMetadata; use crate::pattern::{runtime, GenericPatternItem, PatternItem}; @@ -306,10 +306,7 @@ impl DateTimeZonePatternSelectionData { let glue = Self::load_glue(glue_provider, locale, length, GlueType::DateTime)?; Ok(Self::DateTimeGlue { date, time, glue }) } - NeoComponents::DateTimeZone( - NeoDateTimeComponents::Date(date_components), - zone_components, - ) => { + NeoComponents::DateZone(date_components, zone_components) => { let date = DatePatternSelectionData::try_new_with_skeleton( date_provider, locale, @@ -320,10 +317,7 @@ impl DateTimeZonePatternSelectionData { let glue = Self::load_glue(glue_provider, locale, length, GlueType::DateZone)?; Ok(Self::DateZoneGlue { date, zone, glue }) } - NeoComponents::DateTimeZone( - NeoDateTimeComponents::Time(time_components), - zone_components, - ) => { + NeoComponents::TimeZone(time_components, zone_components) => { let time = TimePatternSelectionData::try_new_with_skeleton( time_provider, locale, @@ -334,10 +328,7 @@ impl DateTimeZonePatternSelectionData { let glue = Self::load_glue(glue_provider, locale, length, GlueType::TimeZone)?; Ok(Self::TimeZoneGlue { time, zone, glue }) } - NeoComponents::DateTimeZone( - NeoDateTimeComponents::DateTime(day_components, time_components), - zone_components, - ) => { + NeoComponents::DateTimeZone(day_components, time_components, zone_components) => { let date = DatePatternSelectionData::try_new_with_skeleton( date_provider, locale,