Skip to content

Commit

Permalink
文言変更
Browse files Browse the repository at this point in the history
  • Loading branch information
ledyba committed Jul 23, 2021
1 parent 4fb3d1d commit f31bc3f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/src/renderer/MomentRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,12 @@ function renderTime(time: dayjs.Dayjs | undefined, now: dayjs.Dayjs): string {
const diff = time.diff(now, 'year', true);
const a = Math.trunc(diff);
const b = Math.trunc((diff-a)*4);
if (b === 0) {
if (a === 0 && b === 0) {
return `さいきん!`;
} else if (b === 0) {
return `季節の歯車を${-a}回巻き戻したころ`;
} else {
return `季節の歯車を${-a}回巻き戻して、さらに季節を${-b}回遡ったころ`;
return `季節の歯車を${-a}回巻き戻して、さらに季節を${-b}つ遡ったころ`;
}
}

Expand Down

0 comments on commit f31bc3f

Please sign in to comment.