hourglass-fuzzy-parsing: A small library for parsing more human friendly date/time formats.

[ bsd3, library, parsing, time ] [ Propose Tags ]

This package parses many different date/time formats. Both absolute and relative dates are supported. See the README for more.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1
Change log CHANGELOG.markdown
Dependencies base (>=4 && <5), hourglass, parsec (>=3.1) [details]
License BSD-3-Clause
Author IlyaPortnov, Tanner Doshier <doshitan@gmail.com>
Maintainer Tanner Doshier <doshitan@gmail.com>
Category Time, Parsing
Home page https://gitlab.com/doshitan/hourglass-fuzzy-parsing
Source repo head: git clone git://gitlab.com/doshitan/hourglass-fuzzy-parsing.git
Uploaded by TannerDoshier at 2015-07-24T02:02:20Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1496 total (6 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-10-14 [all 2 reports]

Readme for hourglass-fuzzy-parsing-0.1.0.0

[back to package description]

Hourglass Fuzzy Parsing

A small package for parsing more human friendly date/time formats into hourglass types. Relative things like:

  • "today", "tomorrow", "yesterday"
  • "in 2 days", "3 weeks ago"
  • "last monday", "next friday"
  • "last month" (1st of this month), "next year" (1st of January of next year)

And absolute things like:

  • DD.MM.YYYY
  • YYYY/MM/DD
  • "12 September 2012 23:12"

4-digits years may be abbreviated (such as 12 for 2012). Both 12-hour and 24-hour time formats are supported, though only for absolute things currently. Relative times only support offsets of days, weeks, months or years currently. Only English words and sentence structure are supported.

Originally based on the dates package.

TODOs

  • Support <date> at <time>, e.g., yesterday at 5 pm
  • Support seconds, minutes, and hours for relative times, e.g., "10 minutes ago"
  • Write some tests and benchmarks