@fluxhub/fluxhub-lib 9.0.71 → 9.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -404,6 +404,8 @@
404
404
  if (dt.length != 10)
405
405
  return null;
406
406
  var a = dt.split('-');
407
+ if (a[0].length < 4)
408
+ return null;
407
409
  return new Date(parseInt(a[0]), parseInt(a[1]) - 1, parseInt(a[2]));
408
410
  }
409
411
  //console.log(dt);/
@@ -427,6 +429,8 @@
427
429
  if (f == 5)
428
430
  a = ab[0].split('-');
429
431
  var b = ab[1].split(':');
432
+ if (a[0].length < 4)
433
+ return null;
430
434
  // console.log("a[0]): "+a[0]+"a[1] :"+a[1]+" a[2]"+a[2]);
431
435
  // console.log(new Date(parseInt(a[0]),parseInt(a[1])-1,parseInt(a[2]),parseInt(b[0]),parseInt(b[1]),parseInt(b[2])));
432
436
  return new Date(parseInt(a[0]), parseInt(a[1]) - 1, parseInt(a[2]), parseInt(b[0]), parseInt(b[1]), 0);
@@ -5997,7 +6001,7 @@
5997
6001
  filter_v = filter_v + ' and ';
5998
6002
  filter_v = filter_v + key + "<=" + this.uti_s.sql_date_grid(this.uti_s.string2date(obj_filtro.dateTo, 5)) + "";
5999
6003
  }
6000
- else if (obj_filtro.dateFrom != null && this.uti_s.sql_date_grid(this.uti_s.string2date(obj_filtro.dateFrom, 1)) != 'dbnull') {
6004
+ else if (obj_filtro.dateFrom != null && this.uti_s.sql_date_grid(this.uti_s.string2date(obj_filtro.dateFrom, 5)) != 'dbnull') {
6001
6005
  var q = '';
6002
6006
  if (obj_filtro.type == "greaterThan")
6003
6007
  q = ' ' + key + ' >= ' + this.uti_s.sql_date_grid(this.uti_s.string2date(obj_filtro.dateFrom, 5)) + '';
@@ -6011,9 +6015,11 @@
6011
6015
  q = ' ' + key + ' <= ' + this.uti_s.sql_date_grid(this.uti_s.string2date(obj_filtro.dateFrom, 5)) + '';
6012
6016
  if (obj_filtro.type == "greaterThanOrEqual")
6013
6017
  q = ' ' + key + ' >= ' + this.uti_s.sql_date_grid(this.uti_s.string2date(obj_filtro.dateFrom, 5)) + '';
6014
- console.log(obj_filtro, ' -> ', q);
6018
+ console.log('LOG DT: ', obj_filtro, ' -> ', q);
6015
6019
  filter_v = filter_v + q;
6016
6020
  }
6021
+ else
6022
+ filter_v = filter_v + '1=1';
6017
6023
  filter_v = filter_v + ' )';
6018
6024
  }
6019
6025
  }