pub struct Date64Type {}
Expand description
64-bit date type: the elapsed time since UNIX epoch in milliseconds (64 bits). Values must be divisible by 86_400_000
. See [DataType::Date64
] for more details.
Implementations§
Source§impl Date64Type
impl Date64Type
Sourcepub fn to_naive_date(i: <Date64Type as ArrowPrimitiveType>::Native) -> NaiveDate
👎Deprecated
pub fn to_naive_date(i: <Date64Type as ArrowPrimitiveType>::Native) -> NaiveDate
Sourcepub fn to_naive_date_opt(
i: <Date64Type as ArrowPrimitiveType>::Native,
) -> Option<NaiveDate>
pub fn to_naive_date_opt( i: <Date64Type as ArrowPrimitiveType>::Native, ) -> Option<NaiveDate>
Converts an arrow Date64Type into a chrono::NaiveDateTime if it fits in the range that chrono::NaiveDateTime can represent.
Returns None
if the calculation would overflow or underflow.
This function is able to handle dates ranging between 1677-09-21 (-9,223,372,800,000) and 2262-04-11 (9,223,286,400,000).
§Arguments
i
- The Date64Type to convert
Returns Some(NaiveDateTime)
if it fits, None
otherwise.
Sourcepub fn from_naive_date(
d: NaiveDate,
) -> <Date64Type as ArrowPrimitiveType>::Native
pub fn from_naive_date( d: NaiveDate, ) -> <Date64Type as ArrowPrimitiveType>::Native
Sourcepub fn add_year_months(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalYearMonthType as ArrowPrimitiveType>::Native,
) -> <Date64Type as ArrowPrimitiveType>::Native
👎Deprecated since 56.0.0: Use add_year_months_opt
instead, which returns an Option to handle overflow.
pub fn add_year_months( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalYearMonthType as ArrowPrimitiveType>::Native, ) -> <Date64Type as ArrowPrimitiveType>::Native
add_year_months_opt
instead, which returns an Option to handle overflow.Adds the given IntervalYearMonthType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to add
Sourcepub fn add_year_months_opt(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalYearMonthType as ArrowPrimitiveType>::Native,
) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
pub fn add_year_months_opt( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalYearMonthType as ArrowPrimitiveType>::Native, ) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
Adds the given IntervalYearMonthType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to add
Returns Some(Date64Type)
if it fits, None
otherwise.
Sourcepub fn add_day_time(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalDayTimeType as ArrowPrimitiveType>::Native,
) -> <Date64Type as ArrowPrimitiveType>::Native
👎Deprecated since 56.0.0: Use add_day_time_opt
instead, which returns an Option to handle overflow.
pub fn add_day_time( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalDayTimeType as ArrowPrimitiveType>::Native, ) -> <Date64Type as ArrowPrimitiveType>::Native
add_day_time_opt
instead, which returns an Option to handle overflow.Adds the given IntervalDayTimeType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to add
Sourcepub fn add_day_time_opt(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalDayTimeType as ArrowPrimitiveType>::Native,
) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
pub fn add_day_time_opt( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalDayTimeType as ArrowPrimitiveType>::Native, ) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
Adds the given IntervalDayTimeType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to add
Returns Some(Date64Type)
if it fits, None
otherwise.
Sourcepub fn add_month_day_nano(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalMonthDayNanoType as ArrowPrimitiveType>::Native,
) -> <Date64Type as ArrowPrimitiveType>::Native
👎Deprecated since 56.0.0: Use add_month_day_nano_opt
instead, which returns an Option to handle overflow.
pub fn add_month_day_nano( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalMonthDayNanoType as ArrowPrimitiveType>::Native, ) -> <Date64Type as ArrowPrimitiveType>::Native
add_month_day_nano_opt
instead, which returns an Option to handle overflow.Adds the given IntervalMonthDayNanoType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to add
Sourcepub fn add_month_day_nano_opt(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalMonthDayNanoType as ArrowPrimitiveType>::Native,
) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
pub fn add_month_day_nano_opt( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalMonthDayNanoType as ArrowPrimitiveType>::Native, ) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
Adds the given IntervalMonthDayNanoType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to add
Returns Some(Date64Type)
if it fits, None
otherwise.
Sourcepub fn subtract_year_months(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalYearMonthType as ArrowPrimitiveType>::Native,
) -> <Date64Type as ArrowPrimitiveType>::Native
👎Deprecated since 56.0.0: Use subtract_year_months_opt
instead, which returns an Option to handle overflow.
pub fn subtract_year_months( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalYearMonthType as ArrowPrimitiveType>::Native, ) -> <Date64Type as ArrowPrimitiveType>::Native
subtract_year_months_opt
instead, which returns an Option to handle overflow.Subtract the given IntervalYearMonthType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to subtract
Sourcepub fn subtract_year_months_opt(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalYearMonthType as ArrowPrimitiveType>::Native,
) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
pub fn subtract_year_months_opt( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalYearMonthType as ArrowPrimitiveType>::Native, ) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
Subtract the given IntervalYearMonthType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to subtract
Returns Some(Date64Type)
if it fits, None
otherwise.
Sourcepub fn subtract_day_time(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalDayTimeType as ArrowPrimitiveType>::Native,
) -> <Date64Type as ArrowPrimitiveType>::Native
👎Deprecated since 56.0.0: Use subtract_day_time_opt
instead, which returns an Option to handle overflow.
pub fn subtract_day_time( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalDayTimeType as ArrowPrimitiveType>::Native, ) -> <Date64Type as ArrowPrimitiveType>::Native
subtract_day_time_opt
instead, which returns an Option to handle overflow.Subtract the given IntervalDayTimeType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to subtract
Sourcepub fn subtract_day_time_opt(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalDayTimeType as ArrowPrimitiveType>::Native,
) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
pub fn subtract_day_time_opt( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalDayTimeType as ArrowPrimitiveType>::Native, ) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
Subtract the given IntervalDayTimeType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to subtract
Returns Some(Date64Type)
if it fits, None
otherwise.
Sourcepub fn subtract_month_day_nano(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalMonthDayNanoType as ArrowPrimitiveType>::Native,
) -> <Date64Type as ArrowPrimitiveType>::Native
👎Deprecated since 56.0.0: Use subtract_month_day_nano_opt
instead, which returns an Option to handle overflow.
pub fn subtract_month_day_nano( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalMonthDayNanoType as ArrowPrimitiveType>::Native, ) -> <Date64Type as ArrowPrimitiveType>::Native
subtract_month_day_nano_opt
instead, which returns an Option to handle overflow.Subtract the given IntervalMonthDayNanoType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to subtract
Sourcepub fn subtract_month_day_nano_opt(
date: <Date64Type as ArrowPrimitiveType>::Native,
delta: <IntervalMonthDayNanoType as ArrowPrimitiveType>::Native,
) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
pub fn subtract_month_day_nano_opt( date: <Date64Type as ArrowPrimitiveType>::Native, delta: <IntervalMonthDayNanoType as ArrowPrimitiveType>::Native, ) -> Option<<Date64Type as ArrowPrimitiveType>::Native>
Subtract the given IntervalMonthDayNanoType to an arrow Date64Type
§Arguments
date
- The date on which to perform the operationdelta
- The interval to subtract
Returns Some(Date64Type)
if it fits, None
otherwise.