pub struct Date<A: AsCalendar> { /* private fields */ }
Expand description

A date for a given calendar

This can work with wrappers arount Calendar types, e.g. Rc<C>, via the AsCalendar trait

Implementations

Construct a new Buddhist Date

Construct a date from an ISO date and some calendar representation

Convert the Date to an ISO Date

Convert the Date to a date in a different calendar

The number of months in the year of this date

The number of days in the year of this date

The number of days in the month of this date

The day of the week for this date

Monday is 1, Sunday is 7, according to ISO

Add a duration to this date, mutating it

Add a duration to this date, returning the new one

Calculating the duration between other - self

The calendar-specific year represented by self

The calendar-specific month represented by self

The calendar-specific day-of-month represented by self

The calendar-specific day-of-month represented by self

Construct a date from raw values for a given calendar. This does not check any invariants for the date and calendar, and should only be called by calendar implementations.

Calling this outside of calendar implementations is sound, but calendar implementations are not expected to do anything sensible with such invalid dates.

Get the inner date implementation. Should not be called outside of calendar implementations

Construct a new Gregorian Date

Construct a new ISO Date

Construct a new ISO date from integers

Construct new Julian Date

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Creates a filterable data provider with the given name for debugging. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.