Change date type

This commit is contained in:
micialware committed 2026-08-28 21:47:47 +03:00
1 parent e7019903b0
commit 188a26e77d
3 files changed
+5 -2

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ impl DeckData {
.cloned()
.collect();
let today = Local::now().to_utc().date_naive();
let today = Local::now().date_naive();
Ok(Self {
fsrs_indices: stats
.iter()
+1 -1
View File
@@ -164,7 +164,7 @@ impl CardStatistics {
pub fn update_fsrs(&mut self, status: WordOpenMode, by_fsrs: bool, fsrs: FSRS)
{
let today = Local::now().to_utc().date_naive().to_epoch_days();
let today = Local::now().date_naive().to_epoch_days();
let written = self.fsrs_opened.to_epoch_days();
let memory = fsrs
.next_states(self.fsrs_memory, 0.9, (today - written) as u32)
+3
View File
@@ -590,7 +590,10 @@ impl RepetitionsState {
word_id: word.id,
last_open: Utc::now(),
score: 1,
fsrs_opened: Utc::now().date_naive(),
fsrs_memory: None,
set_id: deck.id,
fsrs_open_day: Utc::now().date_naive(),
}
})
.collect::<Vec<_>>();