Make eval compile again

This commit is contained in:
Joscha 2021-12-04 21:42:45 +01:00
parent d8782fa28a
commit de1f4a303f
4 changed files with 79 additions and 257 deletions

View file

@ -8,10 +8,10 @@ use std::path::PathBuf;
use chrono::NaiveDate;
use structopt::StructOpt;
// use crate::eval::DateRange;
use crate::eval::{DateRange, EntryMode};
use crate::files::Files;
// mod eval;
mod eval;
mod files;
#[derive(Debug, StructOpt)]
@ -26,11 +26,11 @@ 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));
let range = DateRange::new(
NaiveDate::from_ymd(2021, 11, 20),
NaiveDate::from_ymd(2021, 11, 26),
);
println!("{:#?}", files.eval(EntryMode::Relevant, range));
files.mark_all_dirty();
files.save()?;