The basis indicators 'B' (begin), 'E' (end), 'S' (same) are helpful
Data test;
date="02DEC2022"d;
Frstdaycurrentmonth=Intnx("month",date,0,'B');
FrstdayPrevMonth=Intnx("month",date,-1,'B');
FrstdayNextmonth=Intnx("month",date,1,'B');
FrstdayThisYear = intnx('year',date,0,'B');
LastdayThisYear = intnx('year',date,0,'E');
FrstdayLastYear = intnx('year',date,-1,'B');
LastdayLastYear = intnx('year',date,-1,'E');
FrstdayNextYear = intnx('year',date,1,'B');
LastdayNextYear = intnx('year',date,1,'E');
SamedayPrevMonth=Intnx("month",date,-1,'S');
SamedayNextmonth=Intnx("month",date,1,'S');
SamedayPrevYear=Intnx("year",date,-1,'S');
SamedayNextYear=Intnx("year",date,1,'S');
format date frstday: lastday: Sameday: date9.;
run;