Skip to content

Commit

Permalink
[dateparser] Fix parsing very short weekday names
Browse files Browse the repository at this point in the history
- Update en.yaml file to support two letters days of the week
- #1170
  • Loading branch information
adnan-awan committed Jan 30, 2024
1 parent 30e2c7f commit 1bea64d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
19 changes: 13 additions & 6 deletions dateparser/data/date_translation_data/en.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,39 @@
],
"monday": [
"mon",
"monday"
"monday",
"mo"
],
"tuesday": [
"tue",
"tuesday",
"tu",
"Tues"
],
"wednesday": [
"wed",
"wednesday"
"wednesday",
"we"
],
"thursday": [
"thu",
"thursday"
"thursday",
"th"
],
"friday": [
"fri",
"friday"
"friday",
"fr"
],
"saturday": [
"sat",
"saturday"
"saturday",
"sa"
],
"sunday": [
"sun",
"sunday"
"sunday",
"su"
],
"am": [
"am"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,30 @@ pertain: ["of"]

sentence_splitter_group : 1

# two letters days of week

monday:
- mo

tuesday:
- tu
- Tues

wednesday:
- we

thursday:
- th

friday:
- fr

saturday:
- sa

sunday:
- su

september:
- sept

Expand Down

0 comments on commit 1bea64d

Please sign in to comment.