fix(basic.gblib): Fix in WEEKDAY culture always in English.
This commit is contained in:
parent
8d6b904bc7
commit
87d94cb7bf
1 changed files with 5 additions and 2 deletions
|
@ -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';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue