tmyonline Posted February 25, 2010 Share Posted February 25, 2010 Guys: I'm wondering if there is a PHP method that accepts a date as an argument and returns a boolean value as to whether that date falls on weekend ? Thanks. Link to comment https://forums.phpfreaks.com/topic/193363-how-to-find-out-a-given-date-falls-on-weekend-via-php/ Share on other sites More sharing options...
schilly Posted February 25, 2010 Share Posted February 25, 2010 well if it's a unix timestamp, use date() to get the day of the week then just use a switch statement to check the day against the days of the week. return true or false accordingly. Link to comment https://forums.phpfreaks.com/topic/193363-how-to-find-out-a-given-date-falls-on-weekend-via-php/#findComment-1018108 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.