fix(basic.gblib): NOW keyword is now formatting values with two zeros.

This commit is contained in:
Rodrigo Rodriguez 2021-08-15 12:27:05 -03:00
parent 13361fc903
commit 5c8efeef2a

View file

@ -521,7 +521,7 @@ export class SystemKeywords {
private static getDateFromLocaleString(date: any, contentLocale: any) {
const parts = /^([0-3]?[0-9]).([0-3]?[0-9]).((?:[0-9]{2})?[0-9]{2})$/gi.exec(date);
if (parts[3]) {
if (parts && parts[3]) {
switch (contentLocale) {
case 'pt':
date = new Date(Number.parseInt(parts[2]), Number.parseInt(parts[1]), Number.parseInt(parts[3]), 0, 0, 0, 0);