I am receiving the expiry date as a four-letter string like this, "1226" I need to create a date string from that data.
so far I can get the month and year. tried using time.Parse method was mentioned in the docs but I couldn't figure it out.
func main() {
dateData := "1226"
month := dateData[:2]
year := dateData[2:]
t, _ := time.Parse("2006-01-02", fmt.Sprintf("20%s-%s-00", year, month))
fmt.Println(t)
// expected output is "2026-12-01", and also it's better if we could add one month to this one. then it will become "2027-01-01"
}