use crate::Error;
use chrono::format::{DelayedFormat, ParseError, StrftimeItems};
use chrono::Duration;
use std::clone::Clone;
use std::cmp::{Ord, PartialOrd};
use std::fmt::Display;
use std::marker::Copy;
use std::ops::{Add, Sub};
use std::str::FromStr;
pub trait Spanable:
Copy + Clone + Ord + PartialOrd + Add<Duration, Output = Self> + Sub<Duration, Output = Self>
{
fn signed_duration_since(self, _: Self) -> Duration;
}
pub trait Parsable: FromStr<Err = ParseError> {
fn parse_from_str(_: &str, _: &str) -> Result<Self, Error>
where
Self: Sized;
}
pub trait Formatable: Display {
fn format<'a>(&self, _: &'a str) -> DelayedFormat<StrftimeItems<'a>>;
}