How to calculate month end date in formula?

I have a [Done Date] field in my Task, and I need to derive the (year-specific) date of the end of the month form that date. So eg. if [Done Date] = February 5 2022, then I would derive [Month End Date] = February 28 2022. Is there an obvious way to achieve this?

Just calculate the first of the next month and subtract a day:

Date(If(Month([Done Date]) = 12,Year([Done Date]) + 1,Year([Done Date])),If(Month([Done Date]) = 12,1,Month([Done Date]) + 1),1) - Days(1)

Perfect: thanks!!