Skip to content

Commit

Permalink
Round the review interval up
Browse files Browse the repository at this point in the history
  • Loading branch information
tntmarket committed Aug 23, 2020
1 parent ffbae8c commit b5d5fa7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ts/core/srs/srs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export function rescheduleCurrentNote(signal: SRSSignal) {
Roam.applyToCurrent(node => scheduler.schedule(new SM2Node(node.text, node.selection), signal))
}


const intervalStyle = (interval: string, nextReviewTip: string) => {
return `
[data-link-title^="[[interval]]:${interval}"] ~ [data-link-title]:last-child::before {
Expand Down Expand Up @@ -59,10 +58,10 @@ injectStyle(
${intervalStyle('', '1+ month')}
${intervalStyle('1.', '1 day')}
${range(2, 6)
.map(days => intervalStyle(`${days}.`, `${days} days`))
.map(days => intervalStyle(`${days}.`, `${days + 1} days`))
.join('\n')}
${range(7, 30)
.map(days => intervalStyle(`${days}.`, `${Math.floor(days / 7)} weeks`))
.map(days => intervalStyle(`${days}.`, `${Math.ceil(days / 7)} weeks`))
.join('\n')}
${easeStyle('', 'darkgreen', 'honeydew')}
${easeStyle('1.', 'darkred', 'mistyrose')}
Expand Down

0 comments on commit b5d5fa7

Please sign in to comment.