use crate::data_type;
pub enum DateTimeKind {
Utc,
Local,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct DateTime(pub(crate) data_type::DateTime);
impl DateTime {
pub fn ticks(&self) -> i64 {
i64::from(self.0) >> 2
}
pub fn kind(&self) -> Option<DateTimeKind> {
match i64::from(self.0) & 0b11 {
1 => Some(DateTimeKind::Utc),
2 => Some(DateTimeKind::Local),
_ => None,
}
}
}