###User Defined Function###
_DateAdd

###Description###
Calculates a new date based on a given date and add an interval.

###Syntax###
#include <Date.au3>
_DateAdd ( $sType, $iValToAdd, $sDate )


###Parameters###
@@ParamTable@@
$sType
	of one the following:
	D - Add number of days to the given date
	M - Add number of months to the given date
	Y - Add number of years to the given date
	w - Add number of Weeks to the given date
	h - Add number of hours to the given date
	n - Add number of minutes to the given date
	s - Add number of seconds to the given date
$iValToAdd
	number to be added
$sDate
	Input date in the format YYYY/MM/DD[ HH:MM:SS]
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	Date newly calculated date.
Failure:	0 and sets the @error flag to non-zero.
@error:	1 - Invalid $sType
	2 - Invalid $iValToAdd
	3 - Invalid $sDate
@@End@@


###Remarks###
The function will not return an invalid date.
When 3 months are added to '2004/1/31' then the result will be '2004/04/30'.

See <a href="_DateTimeSplit.htm">_DateTimeSplit()</a> for other possible variations of the input date format.


###Related###
_DateDiff, _DateTimeSplit, _DateToDayOfWeek, _DateToDayOfWeekISO, _DateToDayValue, _DayValueToDate


###Example###
@@IncludeExample@@
