[−][src]Struct finql::calendar::Calendar
Calendar for arbitrary complex holiday rules
Methods
impl Calendar
[src]
pub fn calc_calendar(
holiday_rules: &Vec<Holiday>,
start: i32,
end: i32
) -> Calendar
[src]
holiday_rules: &Vec<Holiday>,
start: i32,
end: i32
) -> Calendar
Calculate all holidays and recognize weekend days for a given range of years
from start
to end
(inclusively). The calculation is performed on the basis
of a vector of holiday rules.
pub fn next_bday(&self, date: NaiveDate) -> NaiveDate
[src]
Calculate the next business day
pub fn prev_bday(&self, date: NaiveDate) -> NaiveDate
[src]
Calculate the previous business day
pub fn is_weekend(&self, day: NaiveDate) -> bool
[src]
Returns true if the date falls on a weekend
pub fn is_holiday(&self, date: NaiveDate) -> bool
[src]
Returns true if the specified day is a bank holiday
pub fn is_business_day(&self, date: NaiveDate) -> bool
[src]
Returns true if the specified day is a business day
Trait Implementations
Auto Trait Implementations
impl Send for Calendar
impl Sync for Calendar
impl Unpin for Calendar
impl UnwindSafe for Calendar
impl RefUnwindSafe for Calendar
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,