@@ -33,15 +33,15 @@ define class jsonutils as custom
33
33
this.aPattern [5 ,2 ] = .t.
34
34
35
35
&& "DD/MM/YYYY HH:MM:SS" or "DD-MM-YYYY HH:MM:SS"
36
- this.aPattern [06 ,1 ] = "^([0-2][0-9]|(3)[0-1])[\/-](((0)[0-9])|((1)[0-2]))[\/-]\d{4} (\d{2} ):(\d{2} ):(\d{2} )$"
36
+ this.aPattern [06 ,1 ] = "^([0-2][0-9]|(3)[0-1])[\/-](((0)[0-9])|((1)[0-2]))[\/-]\d{4} (00|0?[0-9]|1[0-9]|2[0-3] ):([0-9]|[0-5][0-9] ):([0-9]|[0-5][0-9] )$"
37
37
this.aPattern [06 ,2 ] = .t.
38
38
39
39
&& "DD/MM/YY" or "DD-MM-YY"
40
40
this.aPattern [07 ,1 ] = "^([0-2][0-9]|(3)[0-1])[\/-](((0)[0-9])|((1)[0-2]))[\/-]\d{2}$"
41
41
this.aPattern [07 ,2 ] = .t.
42
42
43
43
&& "DD/MM/YY HH:MM:SS" or "DD-MM-YY HH:MM:SS"
44
- this.aPattern [08 ,1 ] = "^([0-2][0-9]|(3)[0-1])[\/-](((0)[0-9])|((1)[0-2]))[\/-]\d{2} (\d{2} ):(\d{2} ):(\d{2} )$"
44
+ this.aPattern [08 ,1 ] = "^([0-2][0-9]|(3)[0-1])[\/-](((0)[0-9])|((1)[0-2]))[\/-]\d{2} (00|0?[0-9]|1[0-9]|2[0-3] ):([0-9]|[0-5][0-9] ):([0-9]|[0-5][0-9] )$"
45
45
this.aPattern [08 ,2 ] = .t.
46
46
47
47
_screen .oRegEx .global = .t.
@@ -89,7 +89,7 @@ define class jsonutils as custom
89
89
For i = 1 to Alen (this.aPattern , 1 )
90
90
_screen .oRegEx .pattern = this.aPattern [i, 1 ]
91
91
if _screen .oRegEx .Test (tcString)
92
- return this.formatDate (tcString, this.aPattern [i, 2 ])
92
+ return Evl ( this.formatDate (tcString, this.aPattern [i, 2 ]), tcString )
93
93
endif
94
94
EndFor
95
95
* It is a normal String
0 commit comments