Struct icu_calendar::buddhist::Buddhist
source · [−]pub struct Buddhist;
Expand description
The Thai Solar Buddhist Calendar
This is basically the same as the Gregorian calendar, however it has a different zero year: 1 AD = 544 BE
Trait Implementations
sourceimpl Calendar for Buddhist
impl Calendar for Buddhist
sourcefn month(&self, date: &Self::DateInner) -> Month
fn month(&self, date: &Self::DateInner) -> Month
The calendar-specific month represented by date
sourcefn day_of_month(&self, date: &Self::DateInner) -> DayOfMonth
fn day_of_month(&self, date: &Self::DateInner) -> DayOfMonth
The calendar-specific day-of-month represented by date
sourcefn day_of_year_info(&self, date: &Self::DateInner) -> DayOfYearInfo
fn day_of_year_info(&self, date: &Self::DateInner) -> DayOfYearInfo
Information of the day of the year
type DateInner = IsoDateInner
type DateInner = IsoDateInner
The internal type used to represent dates
sourcefn date_from_iso(&self, iso: Date<Iso>) -> IsoDateInner
fn date_from_iso(&self, iso: Date<Iso>) -> IsoDateInner
Construct the date from an ISO date
sourcefn date_to_iso(&self, date: &Self::DateInner) -> Date<Iso>
fn date_to_iso(&self, date: &Self::DateInner) -> Date<Iso>
Obtain an ISO date from this date
sourcefn months_in_year(&self, date: &Self::DateInner) -> u8
fn months_in_year(&self, date: &Self::DateInner) -> u8
Count the number of months in a given year, specified by providing a date from that year Read more
sourcefn days_in_year(&self, date: &Self::DateInner) -> u32
fn days_in_year(&self, date: &Self::DateInner) -> u32
Count the number of days in a given year, specified by providing a date from that year Read more
sourcefn days_in_month(&self, date: &Self::DateInner) -> u8
fn days_in_month(&self, date: &Self::DateInner) -> u8
Count the number of days in a given month, specified by providing a date from that year/month Read more
sourcefn offset_date(&self, date: &mut Self::DateInner, offset: DateDuration<Self>)
fn offset_date(&self, date: &mut Self::DateInner, offset: DateDuration<Self>)
Add offset
to date
sourcefn until(
&self,
date1: &Self::DateInner,
date2: &Self::DateInner,
_calendar2: &Self,
largest_unit: DateDurationUnit,
smallest_unit: DateDurationUnit
) -> DateDuration<Self>
fn until(
&self,
date1: &Self::DateInner,
date2: &Self::DateInner,
_calendar2: &Self,
largest_unit: DateDurationUnit,
smallest_unit: DateDurationUnit
) -> DateDuration<Self>
Calculate date2 - date
as a duration Read more
sourcefn debug_name(&self) -> &'static str
fn debug_name(&self) -> &'static str
Obtain a name for the calendar for debug printing
sourcefn day_of_week(&self, date: &Self::DateInner) -> IsoWeekday
fn day_of_week(&self, date: &Self::DateInner) -> IsoWeekday
Calculate the day of the week and return it
sourceimpl IncludedInAnyCalendar for Buddhist
impl IncludedInAnyCalendar for Buddhist
sourcefn to_any(self) -> AnyCalendar
fn to_any(self) -> AnyCalendar
Convert this calendar into an AnyCalendar
, moving it Read more
sourcefn to_any_cloned(&self) -> AnyCalendar
fn to_any_cloned(&self) -> AnyCalendar
Convert this calendar into an AnyCalendar
, cloning it Read more
sourcefn date_to_any(d: &Self::DateInner) -> AnyDateInner
fn date_to_any(d: &Self::DateInner) -> AnyDateInner
Convert a date for this calendar into an AnyDateInner
Read more
impl Copy for Buddhist
Auto Trait Implementations
impl RefUnwindSafe for Buddhist
impl Send for Buddhist
impl Sync for Buddhist
impl Unpin for Buddhist
impl UnwindSafe for Buddhist
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more