Skip to content

Commit b9c02f5

Browse files
authoredApr 4, 2021
Support "tmrw" as shortcode for "tomorrow"
1 parent b6140ec commit b9c02f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/locales/en/parsers/ENCasualDateParser.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/
55
import { assignSimilarDate } from "../../../utils/dayjs";
66
import * as references from "../../../common/casualReferences";
77

8-
const PATTERN = /(now|today|tonight|tomorrow|tmr|yesterday|last\s*night)(?=\W|$)/i;
8+
const PATTERN = /(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i;
99

1010
export default class ENCasualDateParser extends AbstractParserWithWordBoundaryChecking {
1111
innerPattern(context: ParsingContext): RegExp {
@@ -29,6 +29,7 @@ export default class ENCasualDateParser extends AbstractParserWithWordBoundaryCh
2929

3030
case "tomorrow":
3131
case "tmr":
32+
case "tmrw":
3233
return references.tomorrow(context.refDate);
3334

3435
case "tonight":

0 commit comments

Comments
 (0)
Please sign in to comment.