MCPcopy Create free account
hub / github.com/apache/arrow-rs / as_date

Function as_date

arrow-array/src/temporal_conversions.rs:267–269  ·  view source on GitHub ↗

Converts an [`ArrowPrimitiveType`] to [`NaiveDate`]

(v: i64)

Source from the content-addressed store, hash-verified

265
266/// Converts an [`ArrowPrimitiveType`] to [`NaiveDate`]
267pub fn as_date<T: ArrowPrimitiveType>(v: i64) -> Option<NaiveDate> {
268 as_datetime::<T>(v).map(|datetime| datetime.date())
269}
270
271/// Converts an [`ArrowPrimitiveType`] to [`NaiveTime`]
272pub fn as_time<T: ArrowPrimitiveType>(v: i64) -> Option<NaiveTime> {

Callers

nothing calls this directly

Calls 1

dateMethod · 0.80

Tested by

no test coverage detected