@builder6/query-mongodb 0.15.4 → 0.15.5

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.
package/dist/pipelines.js CHANGED
@@ -340,7 +340,7 @@ function _fixAndChainWithIncompleteAnds(chain) {
340
340
  }
341
341
 
342
342
  var tryParseDate = function tryParseDate(value) {
343
- var isoDateRegex = new RegExp("^(\\d{4})([-\\/])(0?[1-9]|1[0-2])\\2(0?[1-9]|[12][0-9]|3[01])((T|\\s)(\\d{1,2}):(\\d{1,2})(:(\\d{1,2}))?(\\.\\d{3})?(Z|(\\+\\d{1,2}\\:\\d{1,2}))?)?$");
343
+ var isoDateRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?(Z|[+-]\d{2}:\d{2})$/;
344
344
 
345
345
  if (typeof value === 'string' && value.length >= 20 && value.length <= 29) {
346
346
  if (isoDateRegex.test(value)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder6/query-mongodb",
3
- "version": "0.15.4",
3
+ "version": "0.15.5",
4
4
  "description": "Querying a MongoDB collection using DevExtreme data store load parameters",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -56,5 +56,5 @@
56
56
  "publishConfig": {
57
57
  "access": "public"
58
58
  },
59
- "gitHead": "f9826f42e58032353b0c6a05903b8a8caeeacf3e"
59
+ "gitHead": "b28edf03179280c46a45bd499adb84a86a5fe0e8"
60
60
  }
package/src/pipelines.js CHANGED
@@ -296,10 +296,9 @@ function* _fixAndChainWithIncompleteAnds(chain) {
296
296
  }
297
297
 
298
298
  const tryParseDate = (value) => {
299
- // 定义正则表达式,匹配不同的日期格式
300
- // 格式:YYYY-MM-DD、YYYY/MM/DD、YYYY/MM/DD HH:MM、YYYY/MM/DD HH:MM:SS、YYYY-MM-DDTHH:MM:SS.SSS+00:00 和 YYYY-MM-DDTHH:MM:SS.SSSZ
299
+ // 正则表达式,用于匹配 ISO 8601 日期格式,YYYY-MM-DDTHH:MM:SS.SSS+00:00 和 YYYY-MM-DDTHH:MM:SS.SSSZ 两种格式
301
300
  // YYYY-MM-DDTHH:MM:SS.SSS+00:00 这种格式是amis input-datetime控件输出的字段值格式
302
- const isoDateRegex = new RegExp("^(\\d{4})([-\\/])(0?[1-9]|1[0-2])\\2(0?[1-9]|[12][0-9]|3[01])((T|\\s)(\\d{1,2}):(\\d{1,2})(:(\\d{1,2}))?(\\.\\d{3})?(Z|(\\+\\d{1,2}\\:\\d{1,2}))?)?$");
301
+ const isoDateRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?(Z|[+-]\d{2}:\d{2})$/;
303
302
 
304
303
  // 检查字符串是否为有效日期字符串的基本条件
305
304
  if (typeof value === 'string' && value.length >= 20 && value.length <= 29) {