Calendar Class

require $_SERVER['DOCUMENT_ROOT'] . "/wp-content/plugins/SkyraaCustomPlugin/classes/calendar.class.php";
$calendar = new Calendar();
$calendar->highlighted_dates = array(
'2011-02-20',
'2011-02-21',
'2011-02-22',
'2011-02-23',
'2011-02-24',
'2011-02-25',
'2011-02-26'
);
$calendar->link_days = false;
print($calendar->output_calendar('2011', '02'));

daysBetweenDates

<?php

/**
* Calculates the diference in days between two dates.
*
* @param string $start_date Start date (format yyyy-mm-dd)
* @param string $end_date End date (format yyyy-mm-dd)
* @param boolean $include_end_date Include end date in calculation (1 day is added)
*
* @return integer Number of days.
* */
function daysBetweenDates($start_date, $end_date, $include_end_date = false) {

// Timestamp for start date
list($s_year, $s_month, $s_day) = explode("-", $start_date);
$start_date_timestamp = mktime(0, 0, 0, $s_month, $s_day, $s_year);

// Timestamp for end date
list($e_year, $e_month, $e_day) = explode("-", $end_date);
$end_date_timestamp = mktime(0, 0, 0, $e_month, $e_day, $e_year);

// Diference between dates
$diff = ($end_date_timestamp - $start_date_timestamp);
$days = floor($diff / (60 * 60 * 24));

if ($include_end_date)
$days++;

return $days;
}

?>