I am working on a php application which requires that I extract the dates of the weekends between two dates and then insert them as single records in the mysql database.
I was thinking if there was a simpler way of doing it, rather than going through the loop between start date and end date and for each date checking if date('l', strtotime($date))
returns "Saturday" or "Sunday"
Thanks for your time
Sunil
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With