Struct Calendar

Source
pub struct Calendar;

Implementations§

Source§

impl Calendar

Source

pub fn from_yn(year: i32, month: MonthName) -> Option<Month>

Source

pub fn from_ynd(year: i32, month: MonthName, day: u8) -> Option<Day>

Trait Implementations§

Source§

impl Calendar for Calendar

Source§

type Year = Year

Source§

type Month = Month

Source§

type Day = Day

Source§

fn from_y(year: i32) -> Option<Year>

Source§

fn from_ym(year: i32, month: u8) -> Option<Self::Month>

Source§

fn from_ymd(year: i32, month: u8, day: u8) -> Option<Self::Day>

Source§

fn from_yo(year: i32, day_ord: u16) -> Option<Self::Day>

Source§

impl Day<Calendar> for Day

Source§

fn ord(&self) -> u8

Source§

fn succ(&self) -> Self

Source§

fn pred(&self) -> Self

Source§

fn the_year(&self) -> Year

Source§

fn the_month(&self) -> Month

Source§

fn ord_in_year(&self) -> u16

Source§

fn is_leap(&self) -> bool

Source§

fn jdn(&self) -> i32

Source§

fn weekday(&self) -> Weekday

Source§

impl Month<Calendar> for Month

Source§

fn ord(&self) -> u8

Source§

fn succ(&self) -> Self

Source§

fn pred(&self) -> Self

Source§

fn the_year(&self) -> Year

Source§

fn num_days(&self) -> usize

Source§

fn day(&self, day_ord: u8) -> Option<Day>

Source§

fn is_leap(&self) -> bool

Source§

fn first_day(&self) -> C::Day

Source§

fn last_day(&self) -> C::Day

Source§

fn days(&self) -> impl Iterator<Item = C::Day>

Source§

impl Year<Calendar> for Year

Source§

fn ord(&self) -> i32

Source§

fn succ(&self) -> Self

Source§

fn pred(&self) -> Self

Source§

fn num_months(&self) -> usize

Source§

fn month(&self, month_ord: u8) -> Option<Month>

Source§

fn first_month(&self) -> Month

Source§

fn last_month(&self) -> Month

Source§

fn months(&self) -> impl Iterator<Item = Month>

Source§

fn num_days(&self) -> usize

Source§

fn day(&self, ord: u16) -> Option<Day>

Source§

fn is_leap(&self) -> bool

Source§

fn first_day(&self) -> C::Day

Source§

fn last_day(&self) -> C::Day

Source§

fn days(&self) -> impl Iterator<Item = C::Day>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.