From ae18c97009dae9e8a1b8855cf4ae5bc3d9879e62 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Tue, 17 Oct 2023 14:56:55 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20one=20last=20locale=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/module.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/module.ts b/src/module.ts index 8e5c4af..e2de103 100644 --- a/src/module.ts +++ b/src/module.ts @@ -144,9 +144,11 @@ ${plugins?.map(plugin => `dayjs.extend(${plugin})`).join('\n')} ${externalPlugins?.map(plugin => `dayjs.extend(${plugin.name})`).join('\n')} ${defaultTimezone ? `dayjs.tz.setDefault('${defaultTimezone}')` : ''} +// defaultLocale: ${JSON.stringify(defaultLocale)} + ${defaultLocale ? ` dayjs.updateLocale(${JSON.stringify(defaultLocale).replace(/^\[|\]$/g, '')}) -dayjs.locale('${defaultLocale[0] || defaultLocale}') +dayjs.locale('${typeof defaultLocale === 'string' ? defaultLocale : defaultLocale[0]}') ` : ""} export default dayjs