Restructure eval module

This commit is contained in:
Joscha 2021-11-24 01:13:45 +01:00
parent 817732abf6
commit 35184e21e9
5 changed files with 208 additions and 199 deletions

View file

@ -5,8 +5,10 @@
use std::path::PathBuf;
use chrono::NaiveDate;
use structopt::StructOpt;
use crate::eval::DateRange;
use crate::files::Files;
mod eval;
@ -24,6 +26,12 @@ fn main() -> anyhow::Result<()> {
let mut files = Files::load(&opt.file)?;
println!("{}", files.now().format("%F %T %Z"));
let range = DateRange::new(
NaiveDate::from_ymd(2021, 11, 20),
NaiveDate::from_ymd(2021, 11, 26),
);
println!("{:#?}", files.eval(range));
files.mark_all_dirty();
files.save()?;