Skip to content

Commit

Permalink
fix: grammatical error when time is singular (#1782)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciniiia authored Mar 27, 2023
1 parent d986045 commit 9a863d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hooks/use-date.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export const useDate = (value: string | Date) => {
return (result = i18n.t('Date.Just_Now'));
if (count === 1 && token === 'xDays')
return (result = i18n.t('Date.Yesterday'));
if (count === 1 && token !== 'xDays')
return i18n.t('Date.Result', { date: result.slice(0, -1) });
return i18n.t('Date.Result', { date: result });
}
}
Expand Down

0 comments on commit 9a863d6

Please # to comment.