Guest User

Untitled

a guest
May 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1.  
  2. $firtMonday = strtotime("2 January 2012");
  3. $nMonday = $firstMonday + (($week -1) * 7 * 24 * 3600);
  4. echo 'Monday: '. date('Y-m-d', $firstMonday) ."\n";
  5. echo 'Thuesday: '. date('Y-m-d', $firstMonday + 86400) ."\n";
  6. echo 'Wednesday: '. date('Y-m-d', $firstMonday + 2 * 86400) ."\n";
  7. echo 'Thursday: '. date('Y-m-d', $firstMonday + 3 * 86400) ."\n";
  8. echo 'Friday: '. date('Y-m-d', $firstMonday + 4 * 86400) ."\n";
  9. echo 'Suturday: '. date('Y-m-d', $firstMonday + 5 * 86400) ."\n";
  10. echo 'Sunday: '. date('Y-m-d', $firstMonday + 6 * 86400) ."\n";
Add Comment
Please, Sign In to add comment