# booking-manager/2.0/assets/libs/icalendar/examples/recurringdate.php

Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar, version 2.0. 41 lines.

- Page: https://pluginprobe.com/plugins/booking-manager/2.0/code/assets/libs/icalendar/examples/recurringdate.php
- Raw: https://pluginprobe.com/plugins/booking-manager/2.0/raw/assets/libs/icalendar/examples/recurringdate.php
- Modified: 2017-09-03T06:53:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/booking-manager/2.0/code/assets/libs/icalendar/examples/recurringdate.php#L10-L20`.

```php
<?php

/**
 * Recurring Date Example
 *
 * Recurring date examples with RRULE property
 *
 */

require_once("../zapcallib.php");

$examples = 
array(
	array(
		"name" => "Abraham Lincon's birthday",
		"date" => "2015-02-12",
		"rule" => "FREQ=YEARLY;INTERVAL=1;BYMONTH=2;BYMONTHDAY=12"
	),

	array(
		"name" => "Start of U.S. Supreme Court Session (1st Monday in October)",
		"date" => "2015-10-01",
		"rule" => "FREQ=YEARLY;INTERVAL=1;BYMONTH=10;BYDAY=1MO"
	)
);

// Use maxdate to limit # of infinitely repeating events
$maxdate = strtotime("2021-01-01");

foreach($examples as $example)
{
	echo $example["name"] . ":\n";
	$rd = new ZCRecurringDate($example["rule"],strtotime($example["date"]));
	$dates = $rd->getDates($maxdate);
	foreach($dates as $d)
	{
		echo "  " . date('l, F j, Y ',$d) . "\n";
	}
	echo "\n";
}

```
