File tree 1 file changed +1
-11
lines changed
1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,7 @@ import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/
5
5
import { assignSimilarDate } from "../../../utils/dayjs" ;
6
6
import * as references from "../../../common/casualReferences" ;
7
7
8
- const PATTERN =
9
- / ( n o w | t o d a y | t o n i g h t | t o m o r r o w | t m r | t m r w | y e s t e r d a y | l a s t \s * n i g h t | (?< ! \d \s * ) d a y \s * a f t e r \s * t o m o r r o w | (?< ! \d \s * ) d a y \s * b e f o r e \s * y e s t e r d a y ) (? = \W | $ ) / i;
8
+ const PATTERN = / ( n o w | t o d a y | t o n i g h t | t o m o r r o w | t m r | t m r w | y e s t e r d a y | l a s t \s * n i g h t ) (? = \W | $ ) / i;
10
9
11
10
export default class ENCasualDateParser extends AbstractParserWithWordBoundaryChecking {
12
11
innerPattern ( context : ParsingContext ) : RegExp {
@@ -45,15 +44,6 @@ export default class ENCasualDateParser extends AbstractParserWithWordBoundaryCh
45
44
assignSimilarDate ( component , targetDate ) ;
46
45
component . imply ( "hour" , 0 ) ;
47
46
}
48
-
49
- if ( lowerText . match ( / a f t e r \s * t o m o r r o w / ) ) {
50
- return references . theDayAfter ( context . reference , 2 ) ;
51
- }
52
-
53
- if ( lowerText . match ( / b e f o r e \s * y e s t e r d a y / ) ) {
54
- return references . theDayBefore ( context . reference , 2 ) ;
55
- }
56
-
57
47
break ;
58
48
}
59
49
You can’t perform that action at this time.
0 commit comments