pub struct CalendarRequest {
pub year: i32,
pub month: u32,
pub day: u32,
pub hour: u32,
pub minute: u32,
pub second: u32,
pub utc_offset_minutes: i32,
pub day_boundary: DayBoundary,
}Expand description
Proleptic Gregorian input and explicit calculation conventions.
Missing JSON minute and second default to zero, utc_offset_minutes to
480 (UTC+08:00), and day_boundary to zi_start. Unknown fields are rejected
so a misspelled convention cannot silently change the result.
Fields§
§year: i32Proleptic Gregorian year, inclusive range 1–9999.
month: u32Gregorian month, 1–12.
day: u32Gregorian day, validated against the month and year.
hour: u32Local civil hour, 0–23.
minute: u32Local civil minute, 0–59.
second: u32Local civil second, 0–59; leap seconds are not accepted.
utc_offset_minutes: i32Fixed offset east of UTC, in minutes, from −840 through +840. Supply the offset actually applicable at the requested date, including DST.
day_boundary: DayBoundaryDay-pillar rollover convention.
Implementations§
Source§impl CalendarRequest
impl CalendarRequest
Sourcepub const fn new(year: i32, month: u32, day: u32, hour: u32) -> CalendarRequest
pub const fn new(year: i32, month: u32, day: u32, hour: u32) -> CalendarRequest
Creates a request at the given hour, in UTC+08:00 with 子初 day rollover.
Validation is performed by crate::calculate.
Trait Implementations§
Source§impl Clone for CalendarRequest
impl Clone for CalendarRequest
Source§fn clone(&self) -> CalendarRequest
fn clone(&self) -> CalendarRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more