general: snapshot

This commit is contained in:
k
2024-10-02 10:48:05 +02:00
parent 9d2c2f7945
commit 669205aa4d
22 changed files with 236 additions and 83 deletions

View File

@@ -45,6 +45,14 @@ impl Date {
.date_naive(),
)
}
pub fn today() -> Self {
Self(chrono::offset::Utc::now().date_naive())
}
pub fn yesterday() -> Self {
Self(Self::today().checked_sub_days(Days::new(1)).unwrap())
}
}
impl MapKey<DateMapChunkId> for Date {