@syncfusion/ej2-base 32.1.22 → 32.1.23

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.
@@ -6347,10 +6347,15 @@ var DateParser = /** @__PURE__ @class */ (function () {
6347
6347
  var tzone = options.timeZone;
6348
6348
  if (!isUndefined(y)) {
6349
6349
  var len = (y + '').length;
6350
- if (len <= 2) {
6350
+ var typedYearString = options.typedYearString || '';
6351
+ var isPaddedAncientYear = /^0{2,3}\d{1,2}$/.test(typedYearString);
6352
+ if (len <= 2 && !isPaddedAncientYear) {
6351
6353
  var century = Math.floor(res.getFullYear() / 100) * 100;
6352
6354
  y += century;
6353
6355
  }
6356
+ if (isPaddedAncientYear) {
6357
+ return null;
6358
+ }
6354
6359
  res.setFullYear(y);
6355
6360
  }
6356
6361
  for (var _i = 0, tKeys_1 = tKeys; _i < tKeys_1.length; _i++) {
@@ -6444,6 +6449,9 @@ var DateParser = /** @__PURE__ @class */ (function () {
6444
6449
  var matchString = matches[curObject.pos];
6445
6450
  if (curObject.isNumber) {
6446
6451
  retOptions["" + prop] = this.internalNumberParser(matchString, num);
6452
+ if (prop === 'year' && !isNullOrUndefined(matchString)) {
6453
+ retOptions.typedYearString = matchString.trim();
6454
+ }
6447
6455
  }
6448
6456
  else {
6449
6457
  if (prop === 'timeZone' && !isUndefined(matchString)) {