fuzzy-dates

Libary for parsing dates in strings in varied formats.

https://github.com/ReedOei/fuzzy-dates#readme

Version on this page:0.1.1.1
LTS Haskell 22.43:0.1.1.2
Stackage Nightly 2024-12-04:0.1.1.2
Latest on Hackage:0.1.1.2

See all snapshots fuzzy-dates appears in

BSD-3-Clause licensed by Reed Oei
Maintained by [email protected]
This version can be pinned in stack with:fuzzy-dates-0.1.1.1@sha256:43ed7f6baf5487df55c1423904ea729006cb1d3bd3c44019838f56ed2ad7f541,1502

Module documentation for 0.1.1.1

fuzzy-dates

Build Status

fuzzy-dates is a Haskell library for parsing dates when you don’t know/care to specify the format of the dates beforehand. It returns dates and times in the hourglass format.

It is heavily based off of https://gitlab.com/doshitan/hourglass-fuzzy-parsing, which had not been updated for over 2 years at the time of writing, so I created this library, and added numerous new date formats to it.

Quickstart

Import the main module, then call one of the extract dates functions, like so:

>>> import Data.Dates.Parsing
>>> extractDatesY 2018 "The party will be on 6/9"
[Date 2018 June 9]
>>> import Data.Dates.Parsing
>>> extractDateTimes "This morning, 06.07.16 at 7:35 AM, the fire was stopped." :: IO [DateTime]
[DateTime {dtDate = Date {dateYear = 2016, dateMonth = July, dateDay = 6}, dtTime = TimeOfDay {todHour = 7h, todMin = 35m, todSec = 0s, todNSec = 0ns}}]

Changes

Changelog for fuzzy-dates

Unreleased changes