diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-01-11 08:11:38 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-02-16 04:39:20 +0100 |
commit | 8ab1b7f70242d3efd74278d15bd5c0c8f2d6d1e2 (patch) | |
tree | 610b7d7d651d6414a67df5df5e80a171993d0ff4 /app/Settings.hs | |
parent | 9d913e0f6c4b2e25130b62db94463174199aa443 (diff) |
feat: add more patterns to `@createdAt`
Diffstat (limited to 'app/Settings.hs')
-rw-r--r-- | app/Settings.hs | 68 |
1 files changed, 66 insertions, 2 deletions
diff --git a/app/Settings.hs b/app/Settings.hs index 43f721c..8f4017c 100644 --- a/app/Settings.hs +++ b/app/Settings.hs @@ -50,7 +50,71 @@ instance Monoid Settings where -- @topic suggested-tags SuggestTagByRE "createdAt" - [R.ed|${d}([0-9]{2})\.${m}([0-9]{2})\.${y}([0-9]{4})///${y}-${m}-${d}|], + [ -- DD.MM.YYYY + [R.ed|${d}([0-9]{2})\.${m}([0-9]{2})\.${y}([0-9]{4})///${y}-${m}-${d}|], + -- DD/MM/YYYY + [R.ed|${d}([0-9]{2})/${m}([0-9]{2})/${y}([0-9]{4})///${y}-${m}-${d}|], + -- DD/MM/YY (20YY) + [R.ed|${d}([0-9]{2})/${m}([0-9]{2})/${y}([0-9]{2})///20${y}-${m}-${d}|], + [R.ed|${d}([0-9]{2})/${m}([0-9]{2})/${y}([0-9]{2})///19${y}-${m}-${d}|], + -- YYYY-MM-DD + [R.ed|${y}([0-9]{4})-${m}([0-9]{2})-${d}([0-9]{4})///${y}-${m}-${d}|], + -- DD.MM.YY (20YY) + [R.ed|${d}([0-9]{2})\.${m}([0-9]{2})\.${y}([0-9]{2})///20${y}-${m}-${d}|], + [R.ed|${d}([0-9]{2})\.${m}([0-9]{2})\.${y}([0-9]{2})///19${y}-${m}-${d}|], + -- DD. Januar YYYY, DD Januar YYYY + [R.ed|${d}([0-9]{2})\.? (Jan\.?|Januar) ${y}([0-9]{4})///${y}-01-${d}|], + [R.ed|${d}([0-9]{2})\.? (Feb\.?|Februar) ${y}([0-9]{4})///${y}-02-${d}|], + [R.ed|${d}([0-9]{2})\.? (Mär\.?|März) ${y}([0-9]{4})///${y}-03-${d}|], + [R.ed|${d}([0-9]{2})\.? (Apr\.?|April) ${y}([0-9]{4})///${y}-04-${d}|], + [R.ed|${d}([0-9]{2})\.? Mai\.? ${y}([0-9]{4})///${y}-05-${d}|], + [R.ed|${d}([0-9]{2})\.? (Jun\.?|Juni) ${y}([0-9]{4})///${y}-06-${d}|], + [R.ed|${d}([0-9]{2})\.? (Jul\.?|Juli) ${y}([0-9]{4})///${y}-07-${d}|], + [R.ed|${d}([0-9]{2})\.? (Aug\.?|August) ${y}([0-9]{4})///${y}-08-${d}|], + [R.ed|${d}([0-9]{2})\.? (Sep\.?|September) ${y}([0-9]{4})///${y}-09-${d}|], + [R.ed|${d}([0-9]{2})\.? (Okt\.?|Oktober) ${y}([0-9]{4})///${y}-10-${d}|], + [R.ed|${d}([0-9]{2})\.? (Nov\.?|November) ${y}([0-9]{4})///${y}-11-${d}|], + [R.ed|${d}([0-9]{2})\.? (Dez\.?|Dezember) ${y}([0-9]{4})///${y}-12-${d}|], + -- D. Januar YYYY, D Januar YYYY + [R.ed|${d}([0-9])\.? (Jan\.?|Januar) ${y}([0-9]{4})///${y}-01-0${d}|], + [R.ed|${d}([0-9])\.? (Feb\.?|Februar) ${y}([0-9]{4})///${y}-02-0${d}|], + [R.ed|${d}([0-9])\.? (Mär\.?|März) ${y}([0-9]{4})///${y}-03-0${d}|], + [R.ed|${d}([0-9])\.? (Apr\.?|April) ${y}([0-9]{4})///${y}-04-0${d}|], + [R.ed|${d}([0-9])\.? Mai\.? ${y}([0-9]{4})///${y}-05-0${d}|], + [R.ed|${d}([0-9])\.? (Jun\.?|Juni) ${y}([0-9]{4})///${y}-06-0${d}|], + [R.ed|${d}([0-9])\.? (Jul\.?|Juli) ${y}([0-9]{4})///${y}-07-0${d}|], + [R.ed|${d}([0-9])\.? (Aug\.?|August) ${y}([0-9]{4})///${y}-08-0${d}|], + [R.ed|${d}([0-9])\.? (Sep\.?|September) ${y}([0-9]{4})///${y}-09-0${d}|], + [R.ed|${d}([0-9])\.? (Okt\.?|Oktober) ${y}([0-9]{4})///${y}-10-0${d}|], + [R.ed|${d}([0-9])\.? (Nov\.?|November) ${y}([0-9]{4})///${y}-11-0${d}|], + [R.ed|${d}([0-9])\.? (Dez\.?|Dezember) ${y}([0-9]{4})///${y}-12-0${d}|], + -- Jun D, YYYY + [R.ed|Jan ${d}([0-9]), ${y}([0-9]{4})///${y}-01-0${d}|], + [R.ed|Feb ${d}([0-9]), ${y}([0-9]{4})///${y}-02-0${d}|], + [R.ed|Mar ${d}([0-9]), ${y}([0-9]{4})///${y}-03-0${d}|], + [R.ed|Apr ${d}([0-9]), ${y}([0-9]{4})///${y}-04-0${d}|], + [R.ed|May ${d}([0-9]), ${y}([0-9]{4})///${y}-05-0${d}|], + [R.ed|Jun ${d}([0-9]), ${y}([0-9]{4})///${y}-06-0${d}|], + [R.ed|Jul ${d}([0-9]), ${y}([0-9]{4})///${y}-07-0${d}|], + [R.ed|Aug ${d}([0-9]), ${y}([0-9]{4})///${y}-08-0${d}|], + [R.ed|Sep ${d}([0-9]), ${y}([0-9]{4})///${y}-09-0${d}|], + [R.ed|Oct ${d}([0-9]), ${y}([0-9]{4})///${y}-10-0${d}|], + [R.ed|Nov ${d}([0-9]), ${y}([0-9]{4})///${y}-11-0${d}|], + [R.ed|Dec ${d}([0-9]), ${y}([0-9]{4})///${y}-12-0${d}|], + -- Jun DD, YYYY + [R.ed|Jan ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-01-${d}|], + [R.ed|Feb ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-02-${d}|], + [R.ed|Mar ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-03-${d}|], + [R.ed|Apr ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-04-${d}|], + [R.ed|May ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-05-${d}|], + [R.ed|Jun ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-06-${d}|], + [R.ed|Jul ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-07-${d}|], + [R.ed|Aug ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-08-${d}|], + [R.ed|Sep ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-09-${d}|], + [R.ed|Oct ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-10-${d}|], + [R.ed|Nov ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-11-${d}|], + [R.ed|Dec ${d}([0-9]{2}), ${y}([0-9]{4})///${y}-12-${d}|] + ], SuggestTagByTags "correspondent" ], defaultLanguage = "deu+eng" @@ -61,7 +125,7 @@ instance A.FromJSON Settings instance A.ToJSON Settings data SuggestedTag - = SuggestTagByRE T.Text (R.SearchReplace R.RE T.Text) + = SuggestTagByRE T.Text [R.SearchReplace R.RE T.Text] | SuggestTagByTags T.Text deriving (Show, Generic, Eq) |