2012-10-09 21:02:12 -07:00

21 lines
327 B
Go

package main
import "time"
import "fmt"
func main() {
now := time.Now()
fmt.Println(now)
then := time.Date(
2009, 11, 17, 20, 34, 58, 651387237, time.UTC)
fmt.Println(then)
diff := now.Sub(then)
fmt.Println(diff)
}
// todo: extract parts
// todo: add duration
// todo: check before / after