package main
import (
"fmt"
"time"
)
// Function to add months to a given date
func AddMonthsToDate(months int, date time.Time) time.Time {
return date.AddDate(0, months, 0)
}
func main() {
// Get the current date
futureDate := AddMonthsToDate(6, time.Now())
// Print the new date
fmt.Println("Date six months from now:", futureDate.Format("2006-01-02"))
}
/*
run:
Date six months from now: 2025-12-12
*/