You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
658 B
29 lines
658 B
//! Typed time file for cassiopeia
|
|
//!
|
|
//! This data gets generated by the `format` module, and can later be
|
|
//! used to generate new files, and perform various lookups and
|
|
//! analysis tasks.
|
|
|
|
use crate::format::LineCfg;
|
|
use chrono::{Date, DateTime, FixedOffset as Offset};
|
|
use std::collections::BTreeMap;
|
|
|
|
#[derive(Default)]
|
|
pub struct TimeFile {
|
|
header: BTreeMap<String, String>,
|
|
sessions: Vec<Session>,
|
|
invoices: Vec<Date<Offset>>,
|
|
}
|
|
|
|
impl TimeFile {
|
|
pub(crate) fn append(self, line: LineCfg) -> Self {
|
|
println!("{:?}", line);
|
|
|
|
self
|
|
}
|
|
}
|
|
|
|
pub struct Session {
|
|
start: DateTime<Offset>,
|
|
stop: DateTime<Offset>,
|
|
}
|
|
|