Implement basic structure for note evaluation

This commit is contained in:
Joscha 2021-11-24 02:05:31 +01:00
parent 8034ec19cd
commit 0bb01369b8
2 changed files with 69 additions and 15 deletions

View file

@ -78,6 +78,14 @@ impl EntryMap {
self.range
}
pub fn set_from(&mut self, from: NaiveDate) {
self.range = DateRange::new(from, self.range.until());
}
pub fn set_until(&mut self, until: NaiveDate) {
self.range = DateRange::new(self.range.from(), until);
}
pub fn block(&mut self, date: NaiveDate) {
if self.range.contains(date) {
self.map.entry(date).or_insert(None);