Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. $repeatDay = "Tuesday";
  2. $followingDay = strtotime($startDateTime. " following $repeatDay");
  3.  
  4. $firstOccurrence=strtotime($start);
  5. $nextOccurence=strtotime("next $day", $firstOccurrence); //Set the first recurring date for this day
  6. while($nextOccurence<=strtotime($activeUntil)){
  7. echo date("M d, Y H:m:i",$nextOccurence)." | ";
  8. $nextOccurence=strtotime("next $day", $nextOccurence);
  9. }
  10.  
  11. // Assuming $startDateTime is a timestamp.
  12. $followingDay = strtotime("next $repeatDay", $startDateTime);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement