blob: 8ebc67f016c540ba4cb9e2847ff62e4125085527 (
plain)
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
|
//! 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>,
}
|