NAME:

	Date_Calc - a class for manipulating and comparing
	Calendar dates, as well as formulating arrays of dates
	for traditional calendar display.

AUTHOR:
	Monte Ohrt <monte@ispi.net>

SYNOPSIS:

	include("Calendar.php");
	$cal = new Date_Calc;
	
	$days = $cal->date_diff("2000","10","01","2045","01","01");
	echo "the number of days between October 10, 2000 and
		January 1st 2045 is $days.";

DESCRIPTION:

	What is Date_Calc?

	Date_Calc is a calendar class used to calculate and
	manipulate calendar dates and retrieve dates in a calendar
	format. It does not rely on 32-bit system date stamps, so
	you can display calendars and compare dates that date
	pre 1970 and post 2038.

	Some of Date_Calc's features:
	
	* comparing number of days between arbitrary dates
	* validating dates
	* calculating leap years
	* calculating the day of the week
	* calculating week of the year
	* calculating first and last days of the month
	* calculating next/prev week day
	* calculating arrays of days for use in calendar displays
	

REQUIREMENTS:

	Any version of PHP with PCRE support should work.
	Date_Calc was developed and tested with PHP 4.0.2.

CLASS METHODS:

	dateNow($format="%Y%m%d")
	isValidDate($day,$month,$year)
	isLeapYear($year="")
	isFutureDate($day,$month,$year)
	isPastDate($day,$month,$year)
	dayOfWeek($day="",$month="",$year="")
	weekOfYear($day,$month,$year)
	julianDate($day="",$month="",$year="")
	quarterOfYear($day="",$month="",$year="")
	beginOfNextMonth($day="",$month="",$year="",$format="%Y%m%d")
	endOfNextMonth($day="",$month="",$year="",$format="%Y%m%d")
	beginOfPrevMonth($day="",$month="",$year="",$format="%Y%m%d")
	endOfPrevMonth($day="",$month="",$year="",$format="%Y%m%d")
	nextWeekday($day="",$month="",$year="",$format="%Y%m%d")
	prevWeekday($day="",$month="",$year="",$format="%Y%m%d")
    function nextDayOfWeek($dow,$day="",$month="",$year="",$format="%Y%m%d",$onOrAfter=false)
    function prevDayOfWeek($dow,$day="",$month="",$year="",$format="%Y%m%d",$onOrAfter=false)
    function nextDayOfWeekOnOrAfter($dow,$day="",$month="",$year="",$format="%Y%m%d")
    function prevDayOfWeekOnOrBefore($dow,$day="",$month="",$year="",$format="%Y%m%d")
	nextDay($day="",$month="",$year="",$format="%Y%m%d")
	prevDay($day="",$month="",$year="",$format="%Y%m%d")
	defaultCentury($year)
	dateDiff($day1,$month1,$year1,$day2,$month2,$year2)
	daysInMonth($month="",$year="")
	weeksInMonth($month="",$year="")
	firstOfMonthWeekday($month="",$year="")
	beginOfMonth($month="",$year="",$format="%Y%m%d")
	beginOfWeek($day="",$month="",$year="",$format="%Y%m%d")
	endOfWeek($day="",$month="",$year="",$format="%Y%m%d")
	beginOfNextWeek($day="",$month="",$year="",$format="%Y%m%d")
	beginOfPrevWeek($day="",$month="",$year="",$format="%Y%m%d")
	getCalendarWeek($day="",$month="",$year="",$format="%Y%m%d")
	getCalendarMonth($month="",$year="",$format="%Y%m%d")
	getCalendarYear($year="",$format="%Y%m%d")
	dateToDays($day,$month,$year)
	daysToDate($days,$format="%Y%m%d")
	NWeekdayOfMonth($occurance,$dayOfWeek,$month,$year,$format="%Y%m%d")
	dateFormat($day,$month,$year$format)
	getYear()
	getMonth()
	getDay()
	getMonthFullname($month)
	getMonthAbbrname($month,$length=3)
	getWeekdayFullname($day="",$month="",$year="")
	getWeekdayAbbrname($day="",$month="",$year="",$length=3)
	
COPYRIGHT:
	Copyright(c) 1999,2000 ispi. All rights reserved.
	This software is released under the PHP License.
	Please read the disclaimer at the top of the Calc.php file.

CREDITS:
	"James T. Perry" <kraziej@ta2.so-net.ne.jp> - bug fix
	allgeyer@web.de - bug fix
	"Nevelle Laiche" <nevelle@stargazer.net> - weeksInMonth()
	Chuck Hagenbuch <chuck@horde.org> - functionality changes
	Horour Kr. Heioarsson <hordur@modernus.is> - bug reports
