Check if a date is within the 1st, 2nd, 3rd, 4th, 5th week of the month PHP [duplicate]

I’m really struggling with this, I’ve looked at other threads but haven’t really found anything that helps.

If I had a list of dates for example.
2023-08-01
2023-08-03
2023-08-12
2023-08-13
2023-08-15
2023-08-23
2023-08-28
2023-08-31

How can I check each date to see whether the date is within week1, week2, week3, week4 or week5 of the current month, where the first day of a week is a monday, and the last day of a week is a sunday?

If the first day of the week is not a monday, for example the first week of the month it could be a tuesday, it should treat tuesday as the first day of the week just for that week.

Expected output
2023-08-01 – first week
2023-08-03 – first week
2023-08-12 – second week
2023-08-13 – third week
2023-08-15 – third week
2023-08-23 – fourth week
2023-08-28 – fifth week
2023-08-31 – fifth week