mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-17 10:11:31 +10:00
- fix language issue when printing
This commit is contained in:
@ -5,6 +5,7 @@ import 'dayjs/locale/en';
|
||||
import 'dayjs/locale/es';
|
||||
import 'dayjs/locale/fi';
|
||||
import 'dayjs/locale/fr';
|
||||
import 'dayjs/locale/ja';
|
||||
import 'dayjs/locale/kn';
|
||||
import 'dayjs/locale/nl';
|
||||
import 'dayjs/locale/pt';
|
||||
|
||||
@ -22,7 +22,11 @@ export const isFileImage = (file) => {
|
||||
return file && acceptedImageTypes.includes(file.type);
|
||||
};
|
||||
|
||||
export const formatDateRange = ({ startDate, endDate, language }) => {
|
||||
export const formatDate = ({ date, language = 'en' }) => {
|
||||
return dayjs(date).locale(language.substr(0, 2)).format('MMMM YYYY');
|
||||
};
|
||||
|
||||
export const formatDateRange = ({ startDate, endDate, language = 'en' }) => {
|
||||
const start = `${dayjs(startDate)
|
||||
.locale(language.substr(0, 2))
|
||||
.format('MMMM YYYY')}`;
|
||||
|
||||
Reference in New Issue
Block a user