we assume that some dynamics are expected and when months do have a different end date like 31,28/29 the statement should also work
we could reformulate also the requirement:
When checkDate (e.g. Today) Day In Month < 7
Then: Today
Else: last Day of current month
So we can formulate this oneliner:

IF(now.Day < 7, now.AddDays(- now.Day + 1).AddMonths(1).AddDays(-1).Date, now.Date)
Other case test:

A february test case:
