[][src]Enum finql::calendar::Holiday

pub enum Holiday {
    WeekDay(Weekday),
    YearlyDay {
        month: u32,
        day: u32,
        first: Option<i32>,
        last: Option<i32>,
    },
    MovableYearlyDay {
        month: u32,
        day: u32,
        first: Option<i32>,
        last: Option<i32>,
    },
    SingularDay(NaiveDate),
    EasterOffset(i32),
    MonthWeekday {
        month: u32,
        weekday: Weekday,
        nth: NthWeek,
        first: Option<i32>,
        last: Option<i32>,
    },
}

Variants

WeekDay(Weekday)

Though weekends are no holidays, they need to be specified in the calendar. Weekends are assumed to be non-business days. In most countries, weekends include Saturday (Sat) and Sunday (Sun). Unfortunately, there are a few exceptions.

YearlyDay

A holiday that occurs every year on the same day. first and last are the first and last year this day is a holiday (inclusively).

Fields of YearlyDay

month: u32day: u32first: Option<i32>last: Option<i32>
MovableYearlyDay

Occurs every year, but is moved to next non-weekend day if it falls on a weekday. Note that Saturday and Sunday here assumed to be weekend days, even if these days are not defined as weekends in this calendar. If the next Monday is already a holiday, the date will be moved to the next available business day. first and last are the first and last year this day is a holiday (inclusively).

Fields of MovableYearlyDay

month: u32day: u32first: Option<i32>last: Option<i32>
SingularDay(NaiveDate)

A single holiday which is valid only once in time.

EasterOffset(i32)

A holiday that is defined in relative days (e.g. -2 for Good Friday) to Easter (Sunday).

MonthWeekday

A holiday that falls on the nth (or last) weekday of a specific month, e.g. the first Monday in May. first and last are the first and last year this day is a holiday (inclusively).

Fields of MonthWeekday

month: u32weekday: Weekdaynth: NthWeekfirst: Option<i32>last: Option<i32>

Auto Trait Implementations

impl Send for Holiday

impl Sync for Holiday

impl Unpin for Holiday

impl UnwindSafe for Holiday

impl RefUnwindSafe for Holiday

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]