==== DATE+ ====
----
Add / subtract a number of days to a date
----
^ __Input Stack__ ^^ ^ __Output Stack__ ^
| **Rdate** | **Idays** | **→** | **Rnewdate** |
| //Level 2// | //Level 1// | //→// | //Level 1// |
{{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}}
| **Keyword type** | [[manual:chapter5:basics#commands|Command]] ||
| **Parallel list processing capabilities** | [[manual:chapter5:listproc#group-6two-arguments-one-result-commands|Group 6]] | //Two arguments, one result commands// |
| **Affected by flags** | [[manual:appendix:flags#flag-42|-42]] | //Date format// |
----
The ''DATE+'' command returns a past or future date given a start date and a number of days; if this number is negative, ''DATE+'' calculates a past date. The date is expressed by a real number and its format depends on the state of flag [[manual:appendix:flags#flag-42|-42]]:
* if the flag [[manual:appendix:flags#flag-42|-42]] is set the date is expressed as **DD.MMYYYY**;
* if the flag [[manual:appendix:flags#flag-42|-42]] is cleared the date is expressed as **MM.DDYYYY**.
where:
* **DD** is the day;
* **MM** is the month;
* **YYYY** is the year.
The range of allowable dates is **October 15, 1582** to **December 31, 9999**.
----
''DATE+'' is fully equivalent to its **userRPL** counterpart.
----
**__Input__**
4:
3:
2: 10.081984
1: -256
…………………………………………………………………………………………………………
-42 SF DATE+
\\
**__Output__**
4:
3:
2:
1: 28.111983
…………………………………………………………………………………………………………
----
{{page>manual:chapter6:system&nofooter&noeditbtn&inline}}