When using MySQL, you can use the LAST_DAY()
function to return the last day of a given month.
You can provide the current date, or you can provide another specified date (for example, a date from a column in a database), and LAST_DAY()
will return the last day of the month for that date.