SyntaxFix
Write A Post
Hire A Developer
Questions
This works for me and is reusable.
function isThisDayAWeekend($date) { $timestamp = strtotime($date); $weekday= date("l", $timestamp ); if ($weekday =="Saturday" OR $weekday =="Sunday") { return true; } else {return false; } }