How to bring the last day of the month?

Doh! Of course, makes total sense. :exploding_head:

1 Like

@George expression works great for every month except february.

What does that mean? What happens when it’s February?

The expression should be a little different to work for all conditions:


If you first add a month it can go wrong if you do that for example on 30 January, it will then go to March which is wrong. It does this because the formatter just add 1 to the month part of the date making it 30 February which is invalid and the date object will then automatically convert that to 1/2 March.


in server action use formatDate(“yyyy-MM-t”)