Skip to content

Instantly share code, notes, and snippets.

@kjk
Created November 18, 2019 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjk/ec81d16977f29daeb6c619ae8b61475d to your computer and use it in GitHub Desktop.
Save kjk/ec81d16977f29daeb6c619ae8b61475d to your computer and use it in GitHub Desktop.
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