1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Note: this module was originally in `Minarrow` and conforms with the Apache Arrow datetime format.
// It is best to keep it consistent but disregard the Arrow/Minarrow context..
//! # **TimeUnits Module** - *Arrow Datetime Units*
//!
//! Defines time and interval units used by temporal arrays in Minarrow.
//!
//! `TimeUnit` standardises second, millisecond, microsecond, nanosecond, and day resolution
//! across `DatetimeArray32` and `DatetimeArray64`.
//! `IntervalUnit` specifies year–month, day–time, or month–day–nanosecond intervals
//! for representing durations or periods in `DatetimeArray` values.
//!
//! Both integrate with Apache Arrow’s native types for FFI compatibility.
use ;
/// # TimeUnit
///
/// Unified time unit enumeration.
///
/// ## Purpose
/// - Combines time units for both `DatetimeArray32` and `DatetimeArray64`.
/// - Confirm time since epoch units, or a raw duration value *(depending on the `ArrowType`
/// that's attached to `Field` during `FieldArray` construction)*.
/// - Avoids proliferating variants that require explicit handling throughout match statements.
///
/// ## Behaviour
/// - Unit values are stored on the `DatetimeArray`, enabling variant-specific logic.
/// - When transmitted over FFI, an `Apache Arrow`- produces compatible native format.