Hi Everyone,
I need to compare if a date from a timestamp is on a weekend (Saturday or Sunday) and add necessary days to the variable to make it a weekday.
This is the code I have now:
$month = "6";
$day = "12";
$incrementBy = "1";
$year = "2007";
$current_stamp = mktime(0,0,0,$month,$day+$incrementBy,$year);
$exact_current_stamp = mktime($hour,$minute,0,$month,$day+=$incrementBy,$year);
With that code, the variables $current_stamp and $exact_current_stamp get an value of 1181703600 (as of today). I need to check when those values get a weekend value and add the appropriate days to become a weekday.
For example, lets say that the value of the timestamp gives me a Saturday, there I know I need to add 2 days to that timestamp. And if it gives me a Sunday, it needs to add 1 day to the timestamp.
What else do I need to add to accomplish this?
Thanks!