Skip to content

Commit

Permalink
0d -> today
Browse files Browse the repository at this point in the history
  • Loading branch information
xxchan committed Aug 29, 2022
1 parent 085e7ad commit 9a63f96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ function renderCountdown(el) {

const diff = prettyDiff(then, now, cfgMinInterval);
if (diff === '') return;
time.textContent = `${timeText} (${then >= now ? 'in' : 'past'} ${diff})`;
if (diff === '0d') {
time.textContent = `${timeText} (today)`;
} else {
time.textContent = `${timeText} (${then >= now ? 'in' : 'past'} ${diff})`;
}
}

function tests() {
Expand Down

0 comments on commit 9a63f96

Please sign in to comment.