Struct omnical::gregorian::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

§

type Year = Year

§

type Month = Month

§

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>,

§

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>,

§

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.