Skip to content

Commit

Permalink
fix(basic.gblib): NOW keyword is now formatting values with two zeros.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Aug 15, 2021
1 parent 13361fc commit 5c8efee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/basic.gblib/services/SystemKeywords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5c8efee

Please sign in to comment.