mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-17 02:01:29 +10:00
- add "Present" key string in i18n
This commit is contained in:
@ -27,13 +27,14 @@ export const formatDate = ({ date, language = 'en' }) => {
|
||||
};
|
||||
|
||||
export const formatDateRange = ({ startDate, endDate, language = 'en' }) => {
|
||||
const { t } = useTranslation();
|
||||
const start = `${dayjs(startDate)
|
||||
.locale(language.substr(0, 2))
|
||||
.format('MMMM YYYY')}`;
|
||||
|
||||
const end = dayjs(endDate).isValid()
|
||||
? `${dayjs(endDate).locale(language.substr(0, 2)).format('MMMM YYYY')}`
|
||||
: 'Present';
|
||||
: t('shared.forms.present');
|
||||
|
||||
return `${start} - ${end}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user