I have a Raspberry Pi Pico with MicroPython and a DS1307 clock connected to it. How can I check what is the last day of the month for a given year and month? I don't care about using RTC if it can be checked in MicroPython itself. For example, for January 2023 it is 31. For February 2023 it is 28. For March 2023 it is 31 and so on.
I searched the internet but couldn't find any answer.