Explanation
The EDATE function returns a date on the same day of the month, n months in the past or future. You can use EDATE to calculate expiration dates, maturity dates, and other due dates. When 1 is given for months , EDATE returns the same date in the next month. Notice that EDATE automatically handles end-of-month dates properly, adjusting the day when needed to return a valid date.
Same date in the previous month
To get the same date in the previous month, use -1 for months:
=EDATE(date,-1) // prior month
Explanation
EDATE can get the “same date” in the future or past, based on the number of months supplied. When 12 is given for months, EDATE gets the same date next year.
Same date in previous year
To get the same date in a previous month, use -12:
=EDATE(date,-12) // prior year