#[non_exhaustive]pub struct PartialDate {
pub at_type: Option<String>,
pub year: Option<u32>,
pub month: Option<u32>,
pub day: Option<u32>,
pub calendar_scale: Option<String>,
pub extra: Map<String, Value>,
}Expand description
A complete or partial Gregorian calendar date (RFC 9553 §2.8.1).
Used by Anniversary. Any of year, month, day may be absent,
representing a partial date; month requires either year or day,
and day requires month.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.at_type: Option<String>Object type discriminator; SHOULD be "PartialDate" when present per RFC 9553 §1.3.4 (may be omitted in defaultType positions).
year: Option<u32>Calendar year.
month: Option<u32>Calendar month, 1..=12. The type does NOT range-check; callers
MUST verify the value is in 1..=12 before treating the
PartialDate as RFC 9553-conformant. Deserialize accepts
out-of-range values (e.g. 13) without complaint.
day: Option<u32>Calendar day of month, 1..=31 (with month-specific cap of
28/29/30/31). The type does NOT range-check; callers MUST
verify the value is in 1..=31 and within the month-specific
cap before treating the PartialDate as RFC 9553-conformant.
Deserialize accepts out-of-range values (e.g. 32) without
complaint.
calendar_scale: Option<String>Calendar system (lowercase CLDR name or vendor-specific value).
extra: Map<String, Value>Catch-all for vendor / site / private extension fields not covered by the typed fields above. Preserves unknown fields across deserialize/serialize round-trip per workspace extras-preservation policy (see workspace AGENTS.md).
Trait Implementations§
Source§impl Clone for PartialDate
impl Clone for PartialDate
Source§fn clone(&self) -> PartialDate
fn clone(&self) -> PartialDate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more