How to show the last day of each month?

I am a rookie and I achieve this, and I would like to ask for your help.

I want to put on the label1 the last day of each month in number, (some months have 31 days, another 30 and 28 in the case of February).

image

if-then-elseif this logic.