Skip to content

Commit

Permalink
fix: irene calc time display
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsuk1ko committed Sep 6, 2023
1 parent 0e87e06 commit 910fc15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/material/IreneCalculatorDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ const formatTime = time => {
const timeStr = time.format(FORMAT_STR);
if (time.isToday()) return timeStr;
if (time.isTomorrow()) return t('common.format.tomorrow', { time: timeStr });
const dur = dayjs.duration(time.diff(dayjs(curTime.value)));
const dur = dayjs.duration(time.diff(dayjs().startOf('day')));
const day = dur.days();
if (day === 2) return t('common.format.2DaysLater', { time: timeStr });
return `+${day}${t('common.format.day')} ${time}`;
return `+${day}${t('common.format.day')} ${timeStr}`;
};
/**
Expand Down

0 comments on commit 910fc15

Please sign in to comment.