Skip to content

Commit

Permalink
fix(basic.gblib): Fix in WEEKDAY culture always in English.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Aug 29, 2021
1 parent 8d6b904 commit 87d94cb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/basic.gblib/services/DialogKeywords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit 87d94cb

Please sign in to comment.