fuzzy-parse-0.1.0.0: Tools for processing unstructured text data

CopyrightDmitry Zuikov 2020
LicenseMIT
Maintainerdzuikov@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Data.Text.Fuzzy.Dates

Description

Dates fuzzy parsing. Supports a number of dates format and tries to recover the incomplete dates from text, with use of some reasonable assumptions. Does not support locales, i.e assums only English for dates yet.

Examples

parseMaybeDay "01.01.1979"
Just 1979-01-01
parseMaybeDay "01.01.01"
Just 2001-01-01
parseMaybeDay "13/01/2019"
Just 2019-01-13
parseMaybeDay "2019-12-1"
Just 2019-12-01
parseMaybeDay "21-feb-79"
Just 1979-02-21
parseMaybeDay "21-feb-01"
Just 2001-02-21
parseMaybeDay "29feb04"
Just 2004-02-29
parseMaybeDay "21feb28"
Just 2028-02-21
Synopsis

Documentation

parseMaybeDay :: Text -> Maybe Day Source #

Tries to parse a date from the text.