@easydata/crud 1.4.9 → 1.4.11

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.
@@ -1308,7 +1308,7 @@ var utils_utils;
1308
1308
  }
1309
1309
  }
1310
1310
  utils.strToTime = strToTime;
1311
- var DT_FORMAT_RGEX = /\[([^\]]+)]|y{4}|M{1,4}|d{1,2}|H{1,2}|h{1,2}|m{2}|s{2}|t{2}/g;
1311
+ var DT_FORMAT_RGEX = /\[([^\]]+)]|y{2,4}|M{1,4}|d{1,2}|H{1,2}|h{1,2}|m{2}|s{2}|t{2}/g;
1312
1312
  /**
1313
1313
  * Returns string representation of the date/time value according to the custom format (second parameter)
1314
1314
  * The format is compatible with the one used in .NET: https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings
@@ -1317,6 +1317,7 @@ var utils_utils;
1317
1317
  */
1318
1318
  function dateTimeToStr(date, format) {
1319
1319
  var year = date.getFullYear();
1320
+ var yearStr = year.toString();
1320
1321
  var month = date.getMonth() + 1;
1321
1322
  var day = date.getDate();
1322
1323
  var hour = date.getHours();
@@ -1325,7 +1326,8 @@ var utils_utils;
1325
1326
  var hour12 = hour % 12 || 12; //the remainder of the division by 12. Or 12 if it's 0
1326
1327
  var isPm = hour > 11;
1327
1328
  var matches = {
1328
- yyyy: year.toString(),
1329
+ yyyy: yearStr,
1330
+ yy: yearStr.substring(yearStr.length - 2),
1329
1331
  MMMM: i18n_i18n.getLongMonthName(month),
1330
1332
  MMM: i18n_i18n.getShortMonthName(month),
1331
1333
  MM: (month < 10) ? '0' + month : month.toString(),