Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initI18n () {
const locale = ilib.getLocale();
if (this.locale !== locale && typeof window === 'object') {
this.locale = locale;
const format = {
type: 'time',
useNative: false,
timezone: 'local',
length: 'full',
date: 'dmwy'
};
this.timeFormat = new DateFmt(format);
const meridiemFormat = {
template: 'a',
initI18n () {
const locale = ilib.getLocale();
if (this.locale !== locale && typeof window === 'object') {
this.locale = locale;
this.dateFormat = new DateFmt({
date: 'dmwy',
length: 'full',
timezone: 'local',
useNative: false
});
this.order = this.dateFormat.getTemplate().match(/([mdy]+)/ig).map(s => s[0].toLowerCase());
}
}