pub struct Xsd10Label {
pub year: i64,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
pub nanos: u32,
}Expand description
Bounded calendar components in XML Schema Datatypes 1.0 year numbering. Year -1 denotes 1 BCE; zero is not a valid label. This is a value-space bridge for already decoded fields, not an XML lexical parser. Arbitrary precision lexical years/fractions remain with the caller’s schema reader.
Fields§
§year: i64Signed XSD1.0 year, excluding zero.
month: u8Month, one through twelve.
day: u8Day within the XSD1.0 month.
hour: u8Original hour, including end-of-day twenty-four.
minute: u8Minute, zero through fifty-nine.
second: u8Second, including sixty before value normalization.
nanos: u32Exact representable fractional nanoseconds.
Implementations§
Source§impl Xsd10Label
impl Xsd10Label
Sourcepub fn at_utc<W: Work>(
self,
timezone_minutes: i16,
execution: &W,
) -> Result<Option<Self>, MemoryError>
pub fn at_utc<W: Work>( self, timezone_minutes: i16, execution: &W, ) -> Result<Option<Self>, MemoryError>
Normalize a label with an explicit timezone to the XSD1.0 UTC value. Returns None for invalid fields or a result outside this bounded year representation. Work refusal remains an error, never a malformed label.
XSD1.0 §3.2.7.3 and Appendix E normalize second sixty by carrying to the next minute even at timezone zero. Appendix E’s month length uses the literal signed year, not XSD1.1/astronomical year numbering. No leap table, occurrence proof or implicit timezone is inferred by this operation. https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#dateTime-order https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#adding-durations-to-dateTimes
§Panics
Only if the private bounded calendar component invariants are violated.