# Date Arithmetic

Certain arithmetic operators may be used in conjunction with date objects in order to determine new dates. Date arithmetic is used to return a date with a certain amount of days specified either added or subtracted.

The requirements are that the date used is a date and not simply a string representation of a date, and that the value used to represent the number of days to be added is a number, and not a string representation of a number.
Both numbers with and without decimal places may be used in date arithmetic. Where numbers without decimal places are used the result is as expected, where numbers with decimals are used, the part of the number after the decimal is ignored, i.e. 10.198 is taken as 10

## Examples

Assume that the current date is 5th November 2000 00:00 GMT
Assume that the date value in field1 is 04/07/71 12:01
Assume that the string value in field2 is 19680118
Assume that the date value in field3 is 01/01/00

Field | Returns | Description
#3 - 7 | 25/12/99 00:00 | the date seven days previously
date() + 365 | 05/11/01 00:00 | the date in one years time
dow() + date() | 6/11/00 00:00 | the current date added to the current day of the week (1)
#1 - doy(#2) | 16/06/71 00:00 | 18 days before the date in field1
10 + date() - 10 | 05/11/00 00:00 | ends up with the date started with