@magic-xpa/gui 4.1100.0-dev4110.168 → 4.1100.0-dev4110.170
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.
|
@@ -5667,37 +5667,7 @@ class DisplayConvertor {
|
|
|
5667
5667
|
breakParams.month = breakParams.month - 1;
|
|
5668
5668
|
if (breakParams.year == 0 && breakParams.month == 0 && breakParams.day == 0)
|
|
5669
5669
|
return null;
|
|
5670
|
-
|
|
5671
|
-
let outVal = NString.ToCharArray(maskStr);
|
|
5672
|
-
let len = pic.getMaskSize();
|
|
5673
|
-
let year = breakParams.year;
|
|
5674
|
-
let outIdx = 0;
|
|
5675
|
-
while (len > 0) {
|
|
5676
|
-
switch (outVal[outIdx].charCodeAt(0)) {
|
|
5677
|
-
case PICInterface.PIC_YY:
|
|
5678
|
-
{
|
|
5679
|
-
this.int_2_a(outVal, outIdx, 2, breakParams.year, '0');
|
|
5680
|
-
let yearStr = NString.FromChars(outVal, outIdx, 2);
|
|
5681
|
-
year = +yearStr;
|
|
5682
|
-
outIdx += 2;
|
|
5683
|
-
len -= 2;
|
|
5684
|
-
}
|
|
5685
|
-
break;
|
|
5686
|
-
case PICInterface.PIC_YYYY:
|
|
5687
|
-
this.int_2_a(outVal, outIdx, 4, breakParams.year, '0');
|
|
5688
|
-
let yearStr = NString.FromChars(outVal, outIdx, 4);
|
|
5689
|
-
year = +yearStr;
|
|
5690
|
-
outIdx += 4;
|
|
5691
|
-
len -= 4;
|
|
5692
|
-
break;
|
|
5693
|
-
default:
|
|
5694
|
-
outIdx++;
|
|
5695
|
-
len--;
|
|
5696
|
-
break;
|
|
5697
|
-
}
|
|
5698
|
-
}
|
|
5699
|
-
let nativeDt = new Date(year, breakParams.month, breakParams.day);
|
|
5700
|
-
return nativeDt;
|
|
5670
|
+
return new Date(breakParams.year, breakParams.month, breakParams.day);
|
|
5701
5671
|
}
|
|
5702
5672
|
fromNativeDateToMgDateNumber(nativeDate, pic) {
|
|
5703
5673
|
let numVal;
|