github.com/jonmorehouse/datelp

A library for converting human readable strings into date objects


Install
go get github.com/jonmorehouse/datelp

Documentation

Datelp

A go library for parsing and extracting dates from text

Build Status

DISCLAIMER: this library is currently a WIP. I'm using this particular version locally in Datebook (a small cli tool for taking notes). Its worth mentioning that an overhaul and official first release are coming in the next few weeks once https://github.com/jonmorehouse/datelp/pull/3 has been finished.

Usage

package main

import (
  "datelp"
  "log"
)

func main() {
  date, err := datelp.Parse("next tuesday")
  if err != nil {
    log.Info("No dates available")
  }
}


First Version Supported Formats

June 1st
June 1st 2015
June 1 2015

Tuesday
next Tuesday
last Wednesday

Tomorrow
Yesterday