pub struct Calendar {
pub year: i64,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
pub nanos: u32,
}Expand description
Gregorian calendar components of a labelled time, not an elapsed-time proof. The year uses astronomical numbering (zero denotes 1 BCE); callers of other calendar contracts must apply their own specified year-numbering convention.
Fields§
§year: i64Signed astronomical Gregorian year.
month: u8Month, one through twelve.
day: u8Day within the month.
hour: u8Hour, zero through twenty-three.
minute: u8Minute, zero through fifty-nine.
second: u8Labelled second, including sixty for an inserted second.
nanos: u32Fractional nanoseconds retained by this Time value.
Implementations§
Source§impl Calendar
impl Calendar
Sourcepub fn instant_at_minutes<W: Work>(
self,
minutes: i16,
execution: &W,
) -> Result<Option<Instant>, MemoryError>
pub fn instant_at_minutes<W: Work>( self, minutes: i16, execution: &W, ) -> Result<Option<Instant>, MemoryError>
Validates a four-digit Gregorian calendar label and projects its signed minute offset into UTC. This is a scalar bridge, not a wire parser or proof that an indicated leap second occurred. It shares the certificate time calendar kernel and permits offsets wider than XSD’s fourteen hours. Years outside 0000..9999 and invalid calendar components return None; resource refusal remains a separate error before arithmetic.