Struct icu_calendar::indian::Indian
source · [−]pub struct Indian;
Expand description
The Indian national calendar
Implementations
Trait Implementations
sourceimpl Calendar for Indian
impl Calendar for Indian
type DateInner = IndianDateInner
type DateInner = IndianDateInner
The internal type used to represent dates
sourcefn date_from_iso(&self, iso: Date<Iso>) -> IndianDateInner
fn date_from_iso(&self, iso: Date<Iso>) -> IndianDateInner
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 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
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 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
sourcefn debug_name(&self) -> &'static str
fn debug_name(&self) -> &'static str
Obtain a name for the calendar for debug printing
sourceimpl CalendarArithmetic for Indian
impl CalendarArithmetic for Indian
fn month_days(year: i32, month: u8) -> u8
fn months_for_every_year() -> u8
fn is_leap_year(year: i32) -> bool
sourceimpl IncludedInAnyCalendar for Indian
impl IncludedInAnyCalendar for Indian
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 Indian
impl Eq for Indian
impl StructuralEq for Indian
impl StructuralPartialEq for Indian
Auto Trait Implementations
impl RefUnwindSafe for Indian
impl Send for Indian
impl Sync for Indian
impl Unpin for Indian
impl UnwindSafe for Indian
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