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