package main
import (
"fmt"
"time"
)
func main() {
t := time.Date(2022, time.June, 20, 0, 0, 0, 0, time.UTC).AddDate(0, 0, 10)
fmt.Println(t.String())
t, _ = time.Parse("2006-01-02", "2022-06-20")
fmt.Println(t.AddDate(0, 0, 10).String())
t = time.Now().AddDate(0, 0, 10)
fmt.Println(t.Format("2006-01-02"))
}
2022-06-30 00:00:00 +0000 UTC
2022-06-30 00:00:00 +0000 UTC
2022-06-30