Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $repeatDay = "Tuesday";
- $followingDay = strtotime($startDateTime. " following $repeatDay");
- $firstOccurrence=strtotime($start);
- $nextOccurence=strtotime("next $day", $firstOccurrence); //Set the first recurring date for this day
- while($nextOccurence<=strtotime($activeUntil)){
- echo date("M d, Y H:m:i",$nextOccurence)." | ";
- $nextOccurence=strtotime("next $day", $nextOccurence);
- }
- // Assuming $startDateTime is a timestamp.
- $followingDay = strtotime("next $repeatDay", $startDateTime);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement