Struct bdays::calendars::WeekendsOnly
source · pub struct WeekendsOnly;
Expand description
The WeekendsOnly
holiday calendar always returns false
for method is_holiday
.
So is_bday
method returns false
only for weekend dates.
Trait Implementations
sourceimpl<T: Datelike + Copy + PartialOrd> HolidayCalendar<T> for WeekendsOnly
impl<T: Datelike + Copy + PartialOrd> HolidayCalendar<T> for WeekendsOnly
sourcefn is_holiday(&self, _date: T) -> bool
fn is_holiday(&self, _date: T) -> bool
Returns
true
if date
is a holiday.sourcefn is_bday(&self, date: T) -> bool
fn is_bday(&self, date: T) -> bool
Returns
true
if date
is a Business Day.
A Business Day is defined as a weekday that is not a holiday. Read moresourcefn to_bday(&self, date: T, adjust_next: bool) -> T
fn to_bday(&self, date: T, adjust_next: bool) -> T
Adjusts
date
to the last/next business day if it’s not a business day.sourcefn advance_bdays(&self, date: T, bdays_count: i32) -> T
fn advance_bdays(&self, date: T, bdays_count: i32) -> T
Advances
bdays_count
number of business days from date
.Auto Trait Implementations
impl RefUnwindSafe for WeekendsOnly
impl Send for WeekendsOnly
impl Sync for WeekendsOnly
impl Unpin for WeekendsOnly
impl UnwindSafe for WeekendsOnly
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more