Can anyone help ?

Given a date, i need a function to return the last date in the month for
the specified date.

thanks in advance !