pub struct Calendar { /* private fields */ }Expand description
Which days count as working days.
Implementations§
Source§impl Calendar
impl Calendar
Sourcepub fn wbci() -> Calendar
pub fn wbci() -> Calendar
Monday to Friday without the nationwide public holidays — the default, and the reading of „bundeseinheitliche Arbeitstage“ that WBCI 2.0 §12.6 and S/PRI 4.4 §11.3 share.
Sourcepub fn mon_fri() -> Calendar
pub fn mon_fri() -> Calendar
Monday to Friday, holidays included: the literal reading of A1 §2.5.
Sourcepub fn werktage() -> Calendar
pub fn werktage() -> Calendar
Werktage: Monday to Saturday without the nationwide public holidays (AH4S/PRI 2.9.5 §3.4 „10 WT“, S/PRI 4.4 §5.1.1 „nächster Werktag (Mo–Sa)“).
Sourcepub const fn counts_saturday(&self) -> bool
pub const fn counts_saturday(&self) -> bool
Whether Saturday counts (the Calendar::werktage reading).
Sourcepub fn with_closed(self, day: Date) -> Calendar
pub fn with_closed(self, day: Date) -> Calendar
Adds a closed day, e.g. a regional holiday that matters to a party.
Sourcepub fn closed(&self, day: Date) -> Option<Closed>
pub fn closed(&self, day: Date) -> Option<Closed>
Why day is not a working day, or None if it is one.
Sourcepub fn is_working_day(&self, day: Date) -> bool
pub fn is_working_day(&self, day: Date) -> bool
Whether day is a working day.
Sourcepub fn add_working_days(&self, day: Date, n: u32) -> Date
pub fn add_working_days(&self, day: Date, n: u32) -> Date
The n-th working day after day (A1 §2.5 „X+n AT“); day itself is not counted.
Sourcepub fn sub_working_days(&self, day: Date, n: u32) -> Date
pub fn sub_working_days(&self, day: Date, n: u32) -> Date
The n-th working day before day (A1 §2.5 „X−n AT“).
Trait Implementations§
impl Eq for Calendar
impl StructuralPartialEq for Calendar
Auto Trait Implementations§
impl Forget for Calendar
impl Freeze for Calendar
impl Move for Calendar
impl RefUnwindSafe for Calendar
impl Send for Calendar
impl Sync for Calendar
impl Unpin for Calendar
impl UnsafeUnpin for Calendar
impl UnwindSafe for Calendar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more