Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Libraries
KOpeningHours
Commits
76c1c630
Commit
76c1c630
authored
Apr 01, 2021
by
David Faure
Browse files
Add support for a dot after short weekday names (Mo. Tu. We. etc.)
(only English for now). Seems quite common among the parse errors.
parent
514c3cc4
Pipeline
#56275
passed with stage
in 22 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/lib/openinghourslexer.l
View file @
76c1c630
...
...
@@ -99,6 +99,14 @@ Fri? { yylval->num = 5; return T_WEEKDAY; }
Sat? { yylval->num = 6; return T_WEEKDAY; }
Sun? { yylval->num = 7; return T_WEEKDAY; }
Mo\. { yylval->num = 1; return T_WEEKDAY; }
Tu\. { yylval->num = 2; return T_WEEKDAY; }
We\. { yylval->num = 3; return T_WEEKDAY; }
Th\. { yylval->num = 4; return T_WEEKDAY; }
Fr\. { yylval->num = 5; return T_WEEKDAY; }
Sa\. { yylval->num = 6; return T_WEEKDAY; }
Su\. { yylval->num = 7; return T_WEEKDAY; }
/* same for month names, technically those should be three letter English abbreviations */
"January" { yylval->num = 1; return T_MONTH; }
"February" { yylval->num = 2; return T_MONTH; }
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment