Skip to content

jarylc/go-chrono

 
 

Repository files navigation

chrono.go

Tiny golang wrapper for chrono-node.

Usage

Installation

go get -u github.com/jarylc/go-chrono/v2

Example

package main

import (
	"fmt"
	"log"
	"time"
	"github.com/jarylc/go-chrono/v2"
)

func main() {
	c, err := chrono.New()
	if err != nil {
		log.Fatal(err)
	}

	t, err := c.ParseDate("tomorrow morning", time.Now())
	if err != nil {
		log.Fatal(err)
		return
	}

	fmt.Println(t)
}

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Jaryl Chng - git@jarylchng.com https://jarylchng.com