Struct edtf::DateComplete[][src]

pub struct DateComplete { /* fields omitted */ }
Expand description

A structure to hold the date portion of a DateTime. It contains a valid date in the proleptic Gregorian calendar.

Implementations

This is supported on crate feature chrono only.

Converts self to a chrono::NaiveDate

Create a complete date. Panics if the date is invalid.

Create a complete date. Returns None if the date is invalid. The only way a date can be invalid is if it isn’t a real date. There are otherwise no limitations on the range of acceptable years.

Gets the year

Gets the month

Gets the day

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Convenience chrono::Datelike implementation, which mostly relies on internal conversion to chrono::NaiveDate.

Returns the year number in the calendar date.

Returns the month number starting from 1. Read more

Returns the month number starting from 0. Read more

Returns the day of month starting from 1. Read more

Returns the day of month starting from 0. Read more

Returns the day of year starting from 1. Read more

Returns the day of year starting from 0. Read more

Returns the day of week.

Returns the ISO week.

Makes a new value with the year number changed. Read more

Makes a new value with the month number (starting from 1) changed. Read more

Makes a new value with the month number (starting from 0) changed. Read more

Makes a new value with the day of month (starting from 1) changed. Read more

Makes a new value with the day of month (starting from 0) changed. Read more

Makes a new value with the day of year (starting from 1) changed. Read more

Makes a new value with the day of year (starting from 0) changed. Read more

Returns the absolute year number starting from 1 with a boolean flag, which is false when the year predates the epoch (BCE/BC) and true otherwise (CE/AD). Read more

Counts the days in the proleptic Gregorian calendar, with January 1, Year 1 (CE) as day 1. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Converts from chrono::NaiveDate.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. 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

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)

recently added

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

Converts the given value to a String. 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.