Created
November 18, 2019 00:46
-
-
Save kjk/ec81d16977f29daeb6c619ae8b61475d to your computer and use it in GitHub Desktop.
example for https://github.com/carmo-evan/strtotime (made with https://codeeval.dev)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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