mirror of
https://github.com/ankitects/anki.git
synced 2025-11-10 14:47:12 -05:00
Normalize intervals query
This commit is contained in:
parent
2fd4039494
commit
740dcedbe6
1 changed files with 4 additions and 4 deletions
|
|
@ -143,13 +143,13 @@ export function prepareIntervalData(
|
||||||
const end = bin.x1! - 1;
|
const end = bin.x1! - 1;
|
||||||
|
|
||||||
if (start === end) {
|
if (start === end) {
|
||||||
return `prop:ivl=${start}`
|
return `"prop:ivl=${start}"`
|
||||||
}
|
}
|
||||||
|
|
||||||
const fromQuery = `prop:ivl>=${start}`
|
const fromQuery = `"prop:ivl>=${start}"`
|
||||||
const tillQuery = `prop:ivl<=${end}`
|
const tillQuery = `"prop:ivl<=${end}"`
|
||||||
|
|
||||||
return `${fromQuery} ${tillQuery}`
|
return `${fromQuery} AND ${tillQuery}`
|
||||||
}
|
}
|
||||||
|
|
||||||
const meanInterval = Math.round(mean(allIntervals) ?? 0);
|
const meanInterval = Math.round(mean(allIntervals) ?? 0);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue