Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return moment.localeData(culture).firstDayOfWeek()
},
parse(value, format, culture) {
if (!value) return null;
const m = getMoment(culture, value, format);
if (m.isValid()) return m.toDate();
return null;
},
format(value, format, culture) {
return getMoment(culture, value).format(format)
}
}
configure.setDateLocalizer(localizer)
}
new Date(),
format,
value
)
if (result.toString() === 'Invalid Date') {
return null;
}
return result;
}
function firstOfWeek(culture) {
const { options } = getLocale(culture)
return (options && options.weekStartsOn) || 0
}
configure.setDateLocalizer({ formats, firstOfWeek, parse, format })
}