Skip to content

Commit

Permalink
Make time delta separator optional
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Mar 26, 2020
1 parent a1aba2d commit 9d93c91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion maubot.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
maubot: 0.1.0
id: xyz.maubot.reminder
version: 0.2.0
version: 0.2.1
license: AGPL-3.0-or-later
modules:
- reminder
Expand Down
6 changes: 3 additions & 3 deletions reminder/locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

locales: Locales = {}

td_sep_en = r"(?:[\s,]{1,3}(?:and\s)?)"
td_sep_en = r"(?:[\s,]{1,3}(?:and\s)?)?"
locales["en_iso"] = Locale(
name="English (ISO)",
timedelta=RegexMatcher(r"(?:(?:in|after)\s)?"
Expand Down Expand Up @@ -69,7 +69,7 @@
name="English (UK)", time=time_12_en, date=ShortYearMatcher(
r"(?P<day>\d{1,2})/(?P<month>\d{1,2})(?:/(?P<year>\d{2}(?:\d{2})?))?(?:\s|$)"))

td_sep_fi = r"(?:[\s,]{1,3}(?:ja\s)?)"
td_sep_fi = r"(?:[\s,]{1,3}(?:ja\s)?)?"
locales["fi_fi"] = Locale(
name="Finnish",
timedelta=RegexMatcher(rf"(?:(?P<years>[-+]?\d+)\s?v(?:uo(?:tta|den))?{td_sep_fi})?"
Expand Down Expand Up @@ -104,7 +104,7 @@
r"(?:\s|$)"),
)

td_sep_de = r"(?:[\s,]{1,3}(?:und\s)?)"
td_sep_de = r"(?:[\s,]{1,3}(?:und\s)?)?"
locales["de_de"] = Locale(
name="German",
timedelta=RegexMatcher(rf"(?:in\s)?"
Expand Down

0 comments on commit 9d93c91

Please sign in to comment.