Struct NaiveDate
struct NaiveDate { ... }
ISO 8601 calendar date without timezone. Allows for every proleptic Gregorian date from Jan 1, 262145 BCE to Dec 31, 262143 CE. Also supports the conversion from ISO 8601 ordinal and week date.
Calendar Date
The ISO 8601 calendar date follows the proleptic Gregorian calendar. It is like a normal civil calendar but note some slight differences:
-
Dates before the Gregorian calendar's inception in 1582 are defined via the extrapolation. Be careful, as historical dates are often noted in the Julian calendar and others and the transition to Gregorian may differ across countries (as late as early 20C).
(Some example: Both Shakespeare from Britain and Cervantes from Spain seemingly died on the same calendar date---April 23, 1616---but in the different calendar. Britain used the Julian calendar at that time, so Shakespeare's death is later.)
-
ISO 8601 calendars has the year 0, which is 1 BCE (a year before 1 CE). If you need a typical BCE/BC and CE/AD notation for year numbers, use the
Datelike::year_cemethod.
Week Date
The ISO 8601 week date is a triple of year number, week number and day of the week with the following rules:
-
A week consists of Monday through Sunday, and is always numbered within some year. The week number ranges from 1 to 52 or 53 depending on the year.
-
The week 1 of given year is defined as the first week containing January 4 of that year, or equivalently, the first week containing four or more days in that year.
-
The year number in the week date may not correspond to the actual Gregorian year. For example, January 3, 2016 (Sunday) was on the last (53rd) week of 2015.
Chrono's date types default to the ISO 8601 calendar date, but
Datelike::iso_week and Datelike::weekday methods can be used to get the corresponding
week date.
Ordinal Date
The ISO 8601 ordinal date is a pair of year number and day of the year ("ordinal"). The ordinal number ranges from 1 to 365 or 366 depending on the year. The year number is the same as that of the calendar date.
This is currently the internal format of Chrono's date types.
Implementations
impl NaiveDate
const fn from_ymd(year: i32, month: u32, day: u32) -> NaiveDateMakes a new
NaiveDatefrom the calendar date (year, month and day).Panics
Panics if the specified calendar day does not exist, on invalid values for
monthorday, or ifyearis out of range forNaiveDate.const fn from_ymd_opt(year: i32, month: u32, day: u32) -> Option<NaiveDate>Makes a new
NaiveDatefrom the calendar date (year, month and day).Errors
Returns
Noneif:- The specified calendar day does not exist (for example 2023-04-31).
- The value for
monthordayis invalid. yearis out of range forNaiveDate.
Example
use NaiveDate; let from_ymd_opt = from_ymd_opt; assert!; assert!; assert!; assert!; // 5 BCE is a leap year assert!; assert!;const fn from_yo(year: i32, ordinal: u32) -> NaiveDateMakes a new
NaiveDatefrom the ordinal date (year and day of the year).Panics
Panics if the specified ordinal day does not exist, on invalid values for
ordinal, or ifyearis out of range forNaiveDate.const fn from_yo_opt(year: i32, ordinal: u32) -> Option<NaiveDate>Makes a new
NaiveDatefrom the ordinal date (year and day of the year).Errors
Returns
Noneif:- The specified ordinal day does not exist (for example 2023-366).
- The value for
ordinalis invalid (for example:0,400). yearis out of range forNaiveDate.
Example
use NaiveDate; let from_yo_opt = from_yo_opt; assert!; assert!; assert!; assert!; assert!; // 5 BCE is a leap year assert!; assert!;const fn from_isoywd(year: i32, week: u32, weekday: Weekday) -> NaiveDateMakes a new
NaiveDatefrom the ISO week date (year, week number and day of the week). The resultingNaiveDatemay have a different year from the input year.Panics
Panics if the specified week does not exist in that year, on invalid values for
week, or if the resulting date is out of range forNaiveDate.const fn from_isoywd_opt(year: i32, week: u32, weekday: Weekday) -> Option<NaiveDate>Makes a new
NaiveDatefrom the ISO week date (year, week number and day of the week). The resultingNaiveDatemay have a different year from the input year.Errors
Returns
Noneif:- The specified week does not exist in that year (for example 2023 week 53).
- The value for
weekis invalid (for example:0,60). - If the resulting date is out of range for
NaiveDate.
Example
use ; let from_ymd = ; let from_isoywd_opt = from_isoywd_opt; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!;The year number of ISO week date may differ from that of the calendar date.
# use ; # let from_ymd = ; # let from_isoywd_opt = from_isoywd_opt; // Mo Tu We Th Fr Sa Su // 2014-W52 22 23 24 25 26 27 28 has 4+ days of new year, // 2015-W01 29 30 31 1 2 3 4 <- so this is the first week assert_eq!; assert_eq!; assert_eq!; // 2015-W52 21 22 23 24 25 26 27 has 4+ days of old year, // 2015-W53 28 29 30 31 1 2 3 <- so this is the last week // 2016-W01 4 5 6 7 8 9 10 assert_eq!; assert_eq!; assert_eq!; assert_eq!;const fn from_num_days_from_ce(days: i32) -> NaiveDateMakes a new
NaiveDatefrom a day's number in the proleptic Gregorian calendar, with January 1, 1 being day 1.Panics
Panics if the date is out of range.
const fn from_num_days_from_ce_opt(days: i32) -> Option<NaiveDate>Makes a new
NaiveDatefrom a day's number in the proleptic Gregorian calendar, with January 1, 1 being day 1.Errors
Returns
Noneif the date is out of range.Example
use NaiveDate; let from_ndays_opt = from_num_days_from_ce_opt; let from_ymd = ; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!;const fn from_weekday_of_month(year: i32, month: u32, weekday: Weekday, n: u8) -> NaiveDateMakes a new
NaiveDateby counting the number of occurrences of a particular day-of-week since the beginning of the given month. For instance, if you want the 2nd Friday of March 2017, you would useNaiveDate::from_weekday_of_month(2017, 3, Weekday::Fri, 2).nis 1-indexed.Panics
Panics if the specified day does not exist in that month, on invalid values for
monthorn, or ifyearis out of range forNaiveDate.const fn from_weekday_of_month_opt(year: i32, month: u32, weekday: Weekday, n: u8) -> Option<NaiveDate>Makes a new
NaiveDateby counting the number of occurrences of a particular day-of-week since the beginning of the given month. For instance, if you want the 2nd Friday of March 2017, you would useNaiveDate::from_weekday_of_month(2017, 3, Weekday::Fri, 2).nis 1-indexed.Errors
Returns
Noneif:- The specified day does not exist in that month (for example the 5th Monday of Apr. 2023).
- The value for
monthornis invalid. yearis out of range forNaiveDate.
Example
use ; assert_eq!fn parse_from_str(s: &str, fmt: &str) -> ParseResult<NaiveDate>Parses a string with the specified format string and returns a new
NaiveDate. See theformat::strftimemodule on the supported escape sequences.Example
use NaiveDate; let parse_from_str = parse_from_str; assert_eq!; assert_eq!;Time and offset is ignored for the purpose of parsing.
# use NaiveDate; # let parse_from_str = parse_from_str; assert_eq!;Out-of-bound dates or insufficient fields are errors.
# use NaiveDate; # let parse_from_str = parse_from_str; assert!; assert!;All parsed fields should be consistent to each other, otherwise it's an error.
# use NaiveDate; # let parse_from_str = parse_from_str; assert!;fn parse_and_remainder<'a>(s: &'a str, fmt: &str) -> ParseResult<(NaiveDate, &'a str)>Parses a string from a user-specified format into a new
NaiveDatevalue, and a slice with the remaining portion of the string. See theformat::strftimemodule on the supported escape sequences.Similar to
parse_from_str.Example
# use ; let = parse_and_remainder.unwrap; assert_eq!; assert_eq!;const fn checked_add_months(self: Self, months: Months) -> Option<Self>Add a duration in
Monthsto the dateUses the last day of the month if the day does not exist in the resulting month.
Errors
Returns
Noneif the resulting date would be out of range.Example
# use ; assert_eq!; assert_eq!;const fn checked_sub_months(self: Self, months: Months) -> Option<Self>Subtract a duration in
Monthsfrom the dateUses the last day of the month if the day does not exist in the resulting month.
Errors
Returns
Noneif the resulting date would be out of range.Example
# use ; assert_eq!; assert_eq!;const fn checked_add_days(self: Self, days: Days) -> Option<Self>Add a duration in
Daysto the dateErrors
Returns
Noneif the resulting date would be out of range.Example
# use ; assert_eq!; assert_eq!; assert_eq!;const fn checked_sub_days(self: Self, days: Days) -> Option<Self>Subtract a duration in
Daysfrom the dateErrors
Returns
Noneif the resulting date would be out of range.Example
# use ; assert_eq!; assert_eq!;const fn and_time(self: &Self, time: NaiveTime) -> NaiveDateTimeMakes a new
NaiveDateTimefrom the current date and givenNaiveTime.Example
use ; let d = from_ymd_opt.unwrap; let t = from_hms_milli_opt.unwrap; let dt: NaiveDateTime = d.and_time; assert_eq!; assert_eq!;const fn and_hms(self: &Self, hour: u32, min: u32, sec: u32) -> NaiveDateTimeMakes a new
NaiveDateTimefrom the current date, hour, minute and second.No leap second is allowed here; use
NaiveDate::and_hms_*methods with a subsecond parameter instead.Panics
Panics on invalid hour, minute and/or second.
const fn and_hms_opt(self: &Self, hour: u32, min: u32, sec: u32) -> Option<NaiveDateTime>Makes a new
NaiveDateTimefrom the current date, hour, minute and second.No leap second is allowed here; use
NaiveDate::and_hms_*_optmethods with a subsecond parameter instead.Errors
Returns
Noneon invalid hour, minute and/or second.Example
use NaiveDate; let d = from_ymd_opt.unwrap; assert!; assert!; // use `and_hms_milli_opt` instead assert!; assert!;const fn and_hms_milli(self: &Self, hour: u32, min: u32, sec: u32, milli: u32) -> NaiveDateTimeMakes a new
NaiveDateTimefrom the current date, hour, minute, second and millisecond.The millisecond part is allowed to exceed 1,000,000,000 in order to represent a leap second, but only when
sec == 59.Panics
Panics on invalid hour, minute, second and/or millisecond.
const fn and_hms_milli_opt(self: &Self, hour: u32, min: u32, sec: u32, milli: u32) -> Option<NaiveDateTime>Makes a new
NaiveDateTimefrom the current date, hour, minute, second and millisecond.The millisecond part is allowed to exceed 1,000,000,000 in order to represent a leap second, but only when
sec == 59.Errors
Returns
Noneon invalid hour, minute, second and/or millisecond.Example
use NaiveDate; let d = from_ymd_opt.unwrap; assert!; assert!; // leap second assert!; assert!; assert!; assert!;const fn and_hms_micro(self: &Self, hour: u32, min: u32, sec: u32, micro: u32) -> NaiveDateTimeMakes a new
NaiveDateTimefrom the current date, hour, minute, second and microsecond.The microsecond part is allowed to exceed 1,000,000,000 in order to represent a leap second, but only when
sec == 59.Panics
Panics on invalid hour, minute, second and/or microsecond.
Example
use ; let d = from_ymd_opt.unwrap; let dt: NaiveDateTime = d.and_hms_micro_opt.unwrap; assert_eq!; assert_eq!; assert_eq!; assert_eq!;const fn and_hms_micro_opt(self: &Self, hour: u32, min: u32, sec: u32, micro: u32) -> Option<NaiveDateTime>Makes a new
NaiveDateTimefrom the current date, hour, minute, second and microsecond.The microsecond part is allowed to exceed 1,000,000 in order to represent a leap second, but only when
sec == 59.Errors
Returns
Noneon invalid hour, minute, second and/or microsecond.Example
use NaiveDate; let d = from_ymd_opt.unwrap; assert!; assert!; // leap second assert!; assert!; assert!; assert!;const fn and_hms_nano(self: &Self, hour: u32, min: u32, sec: u32, nano: u32) -> NaiveDateTimeMakes a new
NaiveDateTimefrom the current date, hour, minute, second and nanosecond.The nanosecond part is allowed to exceed 1,000,000,000 in order to represent a leap second, but only when
sec == 59.Panics
Panics on invalid hour, minute, second and/or nanosecond.
const fn and_hms_nano_opt(self: &Self, hour: u32, min: u32, sec: u32, nano: u32) -> Option<NaiveDateTime>Makes a new
NaiveDateTimefrom the current date, hour, minute, second and nanosecond.The nanosecond part is allowed to exceed 1,000,000,000 in order to represent a leap second, but only when
sec == 59.Errors
Returns
Noneon invalid hour, minute, second and/or nanosecond.Example
use NaiveDate; let d = from_ymd_opt.unwrap; assert!; assert!; // leap second assert!; assert!; assert!; assert!;const fn succ(self: &Self) -> NaiveDateMakes a new
NaiveDatefor the next calendar date.Panics
Panics when
selfis the last representable date.const fn succ_opt(self: &Self) -> Option<NaiveDate>Makes a new
NaiveDatefor the next calendar date.Errors
Returns
Nonewhenselfis the last representable date.Example
use NaiveDate; assert_eq!; assert_eq!;const fn pred(self: &Self) -> NaiveDateMakes a new
NaiveDatefor the previous calendar date.Panics
Panics when
selfis the first representable date.const fn pred_opt(self: &Self) -> Option<NaiveDate>Makes a new
NaiveDatefor the previous calendar date.Errors
Returns
Nonewhenselfis the first representable date.Example
use NaiveDate; assert_eq!; assert_eq!;const fn checked_add_signed(self: Self, rhs: TimeDelta) -> Option<NaiveDate>Adds the number of whole days in the given
TimeDeltato the current date.Errors
Returns
Noneif the resulting date would be out of range.Example
use ; let d = from_ymd_opt.unwrap; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!;const fn checked_sub_signed(self: Self, rhs: TimeDelta) -> Option<NaiveDate>Subtracts the number of whole days in the given
TimeDeltafrom the current date.Errors
Returns
Noneif the resulting date would be out of range.Example
use ; let d = from_ymd_opt.unwrap; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!;const fn signed_duration_since(self: Self, rhs: NaiveDate) -> TimeDeltaSubtracts another
NaiveDatefrom the current date. Returns aTimeDeltaof integral numbers.This does not overflow or underflow at all, as all possible output fits in the range of
TimeDelta.Example
use ; let from_ymd = ; let since = signed_duration_since; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!;const fn years_since(self: &Self, base: Self) -> Option<u32>Returns the number of whole years from the given
baseuntilself.Errors
Returns
Noneifbase > self.fn format_with_items<'a, I, B>(self: &Self, items: I) -> DelayedFormat<I> where I: Iterator<Item = B> + Clone, B: Borrow<Item<'a>>Formats the date with the specified formatting items. Otherwise it is the same as the ordinary
formatmethod.The
Iteratorof items should beCloneable, since the resultingDelayedFormatvalue may be formatted multiple times.Example
use StrftimeItems; use NaiveDate; let fmt = new; let d = from_ymd_opt.unwrap; assert_eq!; assert_eq!;The resulting
DelayedFormatcan be formatted directly via theDisplaytrait.# use NaiveDate; # use StrftimeItems; # let fmt = new.clone; # let d = from_ymd_opt.unwrap; assert_eq!;fn format<'a>(self: &Self, fmt: &'a str) -> DelayedFormat<StrftimeItems<'a>>Formats the date with the specified format string. See the
format::strftimemodule on the supported escape sequences.This returns a
DelayedFormat, which gets converted to a string only when actual formatting happens. You may use theto_stringmethod to get aString, or just feed it intoprint!and other formatting macros. (In this way it avoids the redundant memory allocation.)Panics
Converting or formatting the returned
DelayedFormatpanics if the format string is wrong. Because of this delayed failure, you are recommended to immediately use theDelayedFormatvalue.Example
use NaiveDate; let d = from_ymd_opt.unwrap; assert_eq!; assert_eq!;The resulting
DelayedFormatcan be formatted directly via theDisplaytrait.# use NaiveDate; # let d = from_ymd_opt.unwrap; assert_eq!; assert_eq!;const fn iter_days(self: &Self) -> NaiveDateDaysIteratorReturns an iterator that steps by days across all representable dates.
Example
# use NaiveDate; let expected = ; let mut count = 0; for in from_ymd_opt.unwrap.iter_days.take.enumerate assert_eq!; for d in from_ymd_opt.unwrap.iter_days.rev.takeconst fn iter_weeks(self: &Self) -> NaiveDateWeeksIteratorReturns an iterator that steps by weeks across all representable dates.
Example
# use NaiveDate; let expected = ; let mut count = 0; for in from_ymd_opt.unwrap.iter_weeks.take.enumerate assert_eq!; for d in from_ymd_opt.unwrap.iter_weeks.rev.takeconst fn week(self: &Self, start: Weekday) -> NaiveWeekReturns the
NaiveWeekthat the date belongs to, starting with theWeekdayspecified.const fn leap_year(self: &Self) -> boolReturns
trueif this is a leap year.# use NaiveDate; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!;
impl Add for NaiveDate
fn add(self: Self, rhs: TimeDelta) -> NaiveDate
impl Add for NaiveDate
fn add(self: Self, months: Months) -> <Self as >::Output
impl Add for NaiveDate
fn add(self: Self, days: Days) -> <Self as >::Output
impl AddAssign for NaiveDate
fn add_assign(self: &mut Self, rhs: TimeDelta)
impl Clone for NaiveDate
fn clone(self: &Self) -> NaiveDate
impl Copy for NaiveDate
impl Datelike for NaiveDate
fn year(self: &Self) -> i32Returns the year number in the calendar date.
Example
use ; assert_eq!; assert_eq!; // 309 BCEfn month(self: &Self) -> u32Returns the month number starting from 1.
The return value ranges from 1 to 12.
Example
use ; assert_eq!; assert_eq!;fn month0(self: &Self) -> u32Returns the month number starting from 0.
The return value ranges from 0 to 11.
Example
use ; assert_eq!; assert_eq!;fn day(self: &Self) -> u32Returns the day of month starting from 1.
The return value ranges from 1 to 31. (The last day of month differs by months.)
Example
use ; assert_eq!; assert_eq!;Combined with
NaiveDate::pred_opt, one can determine the number of days in a particular month. (Note that this panics whenyearis out of range.)use ; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!;fn day0(self: &Self) -> u32Returns the day of month starting from 0.
The return value ranges from 0 to 30. (The last day of month differs by months.)
Example
use ; assert_eq!; assert_eq!;fn ordinal(self: &Self) -> u32Returns the day of year starting from 1.
The return value ranges from 1 to 366. (The last day of year differs by years.)
Example
use ; assert_eq!; assert_eq!;Combined with
NaiveDate::pred_opt, one can determine the number of days in a particular year. (Note that this panics whenyearis out of range.)use ; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!;fn ordinal0(self: &Self) -> u32Returns the day of year starting from 0.
The return value ranges from 0 to 365. (The last day of year differs by years.)
Example
use ; assert_eq!; assert_eq!;fn weekday(self: &Self) -> WeekdayReturns the day of week.
Example
use ; assert_eq!; assert_eq!;fn iso_week(self: &Self) -> IsoWeekfn with_year(self: &Self, year: i32) -> Option<NaiveDate>Makes a new
NaiveDatewith the year number changed, while keeping the same month and day.This method assumes you want to work on the date as a year-month-day value. Don't use it if you want the ordinal to stay the same after changing the year, of if you want the week and weekday values to stay the same.
Errors
Returns
Noneif:- The resulting date does not exist (February 29 in a non-leap year).
- The year is out of range for a
NaiveDate.
Examples
use ; assert_eq!; assert_eq!;A leap day (February 29) is a case where this method can return
None.# use ; assert!; assert!;Don't use
with_yearif you want the ordinal date to stay the same:# use ; assert_ne!;fn with_month(self: &Self, month: u32) -> Option<NaiveDate>Makes a new
NaiveDatewith the month number (starting from 1) changed.Errors
Returns
Noneif:- The resulting date does not exist (for example
month(4)when day of the month is 31). - The value for
monthis invalid.
Examples
use ; assert_eq!; assert_eq!; // No month 13 assert_eq!; // No Feb 30Don't combine multiple
Datelike::with_*methods. The intermediate value may not exist.use ; let d = from_ymd_opt.unwrap; assert!; // fails because of invalid intermediate value // Correct version: let d = from_ymd_opt.unwrap; assert_eq!;- The resulting date does not exist (for example
fn with_month0(self: &Self, month0: u32) -> Option<NaiveDate>Makes a new
NaiveDatewith the month number (starting from 0) changed.Errors
Returns
Noneif:- The resulting date does not exist (for example
month0(3)when day of the month is 31). - The value for
month0is invalid.
Example
use ; assert_eq!; assert_eq!; // No month 12 assert_eq!; // No Feb 30- The resulting date does not exist (for example
fn with_day(self: &Self, day: u32) -> Option<NaiveDate>Makes a new
NaiveDatewith the day of month (starting from 1) changed.Errors
Returns
Noneif:- The resulting date does not exist (for example
day(31)in April). - The value for
dayis invalid.
Example
use ; assert_eq!; assert_eq!; // no September 31- The resulting date does not exist (for example
fn with_day0(self: &Self, day0: u32) -> Option<NaiveDate>Makes a new
NaiveDatewith the day of month (starting from 0) changed.Errors
Returns
Noneif:- The resulting date does not exist (for example
day(30)in April). - The value for
day0is invalid.
Example
use ; assert_eq!; assert_eq!; // no September 31- The resulting date does not exist (for example
fn with_ordinal(self: &Self, ordinal: u32) -> Option<NaiveDate>Makes a new
NaiveDatewith the day of year (starting from 1) changed.Errors
Returns
Noneif:- The resulting date does not exist (
with_ordinal(366)in a non-leap year). - The value for
ordinalis invalid.
Example
use ; assert_eq!; assert_eq!; // 2015 had only 365 days assert_eq!; assert_eq!;- The resulting date does not exist (
fn with_ordinal0(self: &Self, ordinal0: u32) -> Option<NaiveDate>Makes a new
NaiveDatewith the day of year (starting from 0) changed.Errors
Returns
Noneif:- The resulting date does not exist (
with_ordinal0(365)in a non-leap year). - The value for
ordinal0is invalid.
Example
use ; assert_eq!; assert_eq!; // 2015 had only 365 days assert_eq!; assert_eq!;- The resulting date does not exist (
impl Debug for NaiveDate
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Default for NaiveDate
fn default() -> Self
impl Display for NaiveDate
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for NaiveDate
impl Freeze for NaiveDate
impl From for NaiveDate
fn from(naive_datetime: NaiveDateTime) -> Self
impl FromStr for NaiveDate
fn from_str(s: &str) -> ParseResult<NaiveDate>
impl Hash for NaiveDate
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl Ord for NaiveDate
fn cmp(self: &Self, other: &NaiveDate) -> Ordering
impl PartialEq for NaiveDate
fn eq(self: &Self, other: &NaiveDate) -> bool
impl PartialOrd for NaiveDate
fn partial_cmp(self: &Self, other: &NaiveDate) -> Option<Ordering>
impl RefUnwindSafe for NaiveDate
impl Send for NaiveDate
impl StructuralPartialEq for NaiveDate
impl Sub for NaiveDate
fn sub(self: Self, rhs: NaiveDate) -> TimeDelta
impl Sub for NaiveDate
fn sub(self: Self, months: Months) -> <Self as >::Output
impl Sub for NaiveDate
fn sub(self: Self, rhs: TimeDelta) -> NaiveDate
impl Sub for NaiveDate
fn sub(self: Self, days: Days) -> <Self as >::Output
impl SubAssign for NaiveDate
fn sub_assign(self: &mut Self, rhs: TimeDelta)
impl Sync for NaiveDate
impl Unpin for NaiveDate
impl UnsafeUnpin for NaiveDate
impl UnwindSafe for NaiveDate
impl<T> Any for NaiveDate
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for NaiveDate
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for NaiveDate
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for NaiveDate
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for NaiveDate
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for NaiveDate
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for NaiveDate
fn to_string(self: &Self) -> String
impl<T, U> Into for NaiveDate
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for NaiveDate
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for NaiveDate
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>