@magic-xpa/gui 4.901.0-dev491.337 → 4.901.0-dev491.338
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.
|
@@ -5635,37 +5635,7 @@ class DisplayConvertor {
|
|
|
5635
5635
|
breakParams.month = breakParams.month - 1;
|
|
5636
5636
|
if (breakParams.year == 0 && breakParams.month == 0 && breakParams.day == 0)
|
|
5637
5637
|
return null;
|
|
5638
|
-
|
|
5639
|
-
let outVal = NString.ToCharArray(maskStr);
|
|
5640
|
-
let len = pic.getMaskSize();
|
|
5641
|
-
let year = breakParams.year;
|
|
5642
|
-
let outIdx = 0;
|
|
5643
|
-
while (len > 0) {
|
|
5644
|
-
switch (outVal[outIdx].charCodeAt(0)) {
|
|
5645
|
-
case PICInterface.PIC_YY:
|
|
5646
|
-
{
|
|
5647
|
-
this.int_2_a(outVal, outIdx, 2, breakParams.year, '0');
|
|
5648
|
-
let yearStr = NString.FromChars(outVal, outIdx, 2);
|
|
5649
|
-
year = +yearStr;
|
|
5650
|
-
outIdx += 2;
|
|
5651
|
-
len -= 2;
|
|
5652
|
-
}
|
|
5653
|
-
break;
|
|
5654
|
-
case PICInterface.PIC_YYYY:
|
|
5655
|
-
this.int_2_a(outVal, outIdx, 4, breakParams.year, '0');
|
|
5656
|
-
let yearStr = NString.FromChars(outVal, outIdx, 4);
|
|
5657
|
-
year = +yearStr;
|
|
5658
|
-
outIdx += 4;
|
|
5659
|
-
len -= 4;
|
|
5660
|
-
break;
|
|
5661
|
-
default:
|
|
5662
|
-
outIdx++;
|
|
5663
|
-
len--;
|
|
5664
|
-
break;
|
|
5665
|
-
}
|
|
5666
|
-
}
|
|
5667
|
-
let nativeDt = new Date(year, breakParams.month, breakParams.day);
|
|
5668
|
-
return nativeDt;
|
|
5638
|
+
return new Date(breakParams.year, breakParams.month, breakParams.day);
|
|
5669
5639
|
}
|
|
5670
5640
|
fromNativeDateToMgDateNumber(nativeDate, pic) {
|
|
5671
5641
|
let numVal;
|