Skip to content

Instantly share code, notes, and snippets.

@kjk kjk/strtotime.go
Created Nov 18, 2019

Embed
What would you like to do?
package main
import (
"fmt"
"github.com/carmo-evan/strtotime"
"time"
"log"
)
func main() {
u, err := strtotime.Parse("next Friday 3pm", time.Now().Unix())
if err != nil {
log.Fatalf("strtotime.Parse() failed with '%s'\n", err)
}
t := time.Unix(u,0)
fmt.Println(t)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.