Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isWeekend($time) // Lørdag 06:00 til Mandag 06:00
- {
- $weekDay = date('w', strtotime($time));
- $hour = date('G', strtotime($time));
- $min = date('i', strtotime($time));
- if ($weekDay == 0) // Søndag
- return true;
- if (($weekDay == 6) and // Lørdag
- ($hour >=6) and
- ($min >=0))
- return true;
- if (($weekDay == 1) and // Mandag
- ($hour =< 6) and
- ($min =<0))
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement