From 87d94cb7bf2456a798b9a8640a604fbf7c33636f Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Sat, 28 Aug 2021 21:19:49 -0300 Subject: [PATCH] fix(basic.gblib): Fix in WEEKDAY culture always in English. --- packages/basic.gblib/services/DialogKeywords.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/basic.gblib/services/DialogKeywords.ts b/packages/basic.gblib/services/DialogKeywords.ts index 75484b11..5ee76c79 100644 --- a/packages/basic.gblib/services/DialogKeywords.ts +++ b/packages/basic.gblib/services/DialogKeywords.ts @@ -151,13 +151,16 @@ export class DialogKeywords { ); let dt = SystemKeywords.getDateFromLocaleString(date, contentLocale); - GBLog.info(`BASIC WEEKDAY contentLocale: ${contentLocale}`); + GBLog.info(`BASIC WEEKDAY contentLocale: ${this.getContentLocaleWithCulture(contentLocale)}`); + GBLog.info(`BASIC WEEKDAY date: ${dt}`); + GBLog.info(dt.toLocaleString(this.getContentLocaleWithCulture(contentLocale), { weekday: 'short' })); + if (dt) { if (!(dt instanceof Date)) { dt = new Date(dt); } let week = dt.toLocaleString(this.getContentLocaleWithCulture(contentLocale), { weekday: 'short' }); - return week.substr(0,3); + return week.substr(0, 3); } return 'NULL'; }