This is an automated email from the ASF dual-hosted git repository.

yongjiezhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new a57ed76e72 Fix faulty datetime parser regex (#20290)
a57ed76e72 is described below

commit a57ed76e728958447e1f05445519ff5c0774031b
Author: Reese <10563996+reesercoll...@users.noreply.github.com>
AuthorDate: Wed Jun 8 10:02:58 2022 -0400

    Fix faulty datetime parser regex (#20290)
---
 .../explore/components/controls/DateFilterControl/utils/dateParser.ts   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/superset-frontend/src/explore/components/controls/DateFilterControl/utils/dateParser.ts
 
b/superset-frontend/src/explore/components/controls/DateFilterControl/utils/dateParser.ts
index 0d259f8c80..e4863665bf 100644
--- 
a/superset-frontend/src/explore/components/controls/DateFilterControl/utils/dateParser.ts
+++ 
b/superset-frontend/src/explore/components/controls/DateFilterControl/utils/dateParser.ts
@@ -35,7 +35,7 @@ import { SEVEN_DAYS_AGO, MIDNIGHT, MOMENT_FORMAT } from 
'./constants';
  * @see: https://www.w3.org/TR/NOTE-datetime
  */
 const iso8601 = 
String.raw`\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d+)?(?:(?:[+-]\d\d:\d\d)|Z)?`;
-const datetimeConstant = String.raw`TODAY|NOW`;
+const datetimeConstant = String.raw`(?:TODAY|NOW)`;
 const grainValue = String.raw`[+-]?[1-9][0-9]*`;
 const grain = String.raw`YEAR|QUARTER|MONTH|WEEK|DAY|HOUR|MINUTE|SECOND`;
 const CUSTOM_RANGE_EXPRESSION = RegExp(

Reply via email to