https://se.mathworks.com/help/finance/datemnth.html
datemnth - Date of day in future or past month - MATLAB
This MATLAB function determines a date in a future or past month based on movement either forward or backward in time by a given number of months.
past monthdatedayfuturematlab