PluginProbe
Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar / 2.0.2
Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar v2.0.2
2.1.21 2.1.20 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 trunk 1.1 2.0 2.0.1 2.0.10.2 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.16 2.0.17 2.0.18 2.0.2 2.0.20 2.0.21 2.0.22 All 55 releases
booking-manager / assets / libs / icalendar / examples / recurringdate.php

recurringdate.php in Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar 2.0.2, at assets/libs/icalendar/examples/recurringdate.php

41 lines 820 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Recurring Date Example
5 *
6 * Recurring date examples with RRULE property
7 *
8 */
9
10 require_once("../zapcallib.php");
11
12 $examples =
13 array(
14 array(
15 "name" => "Abraham Lincon's birthday",
16 "date" => "2015-02-12",
17 "rule" => "FREQ=YEARLY;INTERVAL=1;BYMONTH=2;BYMONTHDAY=12"
18 ),
19
20 array(
21 "name" => "Start of U.S. Supreme Court Session (1st Monday in October)",
22 "date" => "2015-10-01",
23 "rule" => "FREQ=YEARLY;INTERVAL=1;BYMONTH=10;BYDAY=1MO"
24 )
25 );
26
27 // Use maxdate to limit # of infinitely repeating events
28 $maxdate = strtotime("2021-01-01");
29
30 foreach($examples as $example)
31 {
32 echo $example["name"] . ":\n";
33 $rd = new ZCRecurringDate($example["rule"],strtotime($example["date"]));
34 $dates = $rd->getDates($maxdate);
35 foreach($dates as $d)
36 {
37 echo " " . date('l, F j, Y ',$d) . "\n";
38 }
39 echo "\n";
40 }
41