mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-17 10:11:31 +10:00
Issue #314: Added BirthDate field to Profile builder and Castform template
This commit is contained in:
@ -20,8 +20,11 @@ export const isFileImage = (file) => {
|
||||
return file && acceptedImageTypes.includes(file.type);
|
||||
};
|
||||
|
||||
export const formatDate = ({ date, language = 'en' }) => {
|
||||
return dayjs(date).locale(language.substr(0, 2)).format('MMMM YYYY');
|
||||
export const formatDate = ({ date, language = 'en', includeDay = false }) => {
|
||||
const monthYearTemplate = 'MMMM YYYY';
|
||||
const template = includeDay ? 'DD ' + monthYearTemplate : monthYearTemplate;
|
||||
|
||||
return dayjs(date).locale(language.substr(0, 2)).format(template);
|
||||
};
|
||||
|
||||
export const formatDateRange = ({ startDate, endDate, language = 'en' }, t) => {
|
||||
|
||||
Reference in New Issue
Block a user