hourglass-fuzzy-parsing

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

Latest on Hackage:0.1.0.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed by IlyaPortnov, Tanner Doshier
Maintained by Tanner Doshier

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

Changes

0.1.0.1 (2015-07-23)

Fix compiling with 7.8 (due to the AMP stuff)

0.1.0.0 (2015-07-23)

Initial fork from the dates package.

Depends on:
comments powered byDisqus