DatePlus
DatePlus[date,n]
gives the date n days after date.
DatePlus[date,{n,step}]
gives the date n calendar steps after date.
DatePlus[date,{{n1,step1},{n2,step2},…}]
gives a date offset by ni steps of each specified size.
DatePlus[n]
gives the date n days after the current date.
DatePlus[offset]
gives the date with the specified offset from the current date.
Details and Options


- DatePlus[date,-n] gives the date n days before date.
- Dates can be specified in the following forms:
-
DateObject[…] date object {y,m,d} year, month, day {y,m} the first day of the specified month {y} January 1 of the year y "string" date as a string ("Jan. 1, 2000") {y,m,d,h,m,s} precise time time absolute time specification - Possible step sizes are calendar steps and day types "Year", "Quarter", "Month", "Week", "Day", "Hour", "Minute", "Second", "Weekday", "Weekend", Monday through Sunday, "EndOfMonth", and "BeginningOfMonth", "BusinessDay".
- Offsets can also be specified using the Quantity framework.
- {y,m,d} is taken to be equivalent to {y,m,d,0,0,0} etc.
- DatePlus[date,offset] gives results in the same general format as date.
- When date is a list, the result has the same length as date, possibly extended to include the smallest step in offset. »
- When date is a string, the result is in the form specified by $DateStringFormat.
- DatePlus takes the following options:
-
CalendarType "Gregorian" calendar in which the dates have been specified HolidayCalendar {"UnitedStates","Default"} holiday schedule and subspecification for the business day and holiday computations
Examples
open allclose allBasic Examples (5)
Scope (13)
Date Formats (5)
DatePlus can take dates in the standard {y,m,d,h,m,s} format of DateList:
DatePlus can take dates in any format supported by DateString:
If a date is given as {y,m,d}, DatePlus returns in the same form:
{y,m} is interpreted as the first day of the specified month:
Options (4)
Properties & Relations (2)
DatePlus adds calendar steps to dates, while DateDifference computes time distances between dates:
Use $DateStringFormat to set the default format for date strings:
Possible Issues (3)

Use DateList to disambiguate between different interpretations:
When list increments are specified, they are added from highest order to lowest:
The order in which calendar units are added can change the results of arithmetic operations, due to variable lengths for months and years:
Text
Wolfram Research (2007), DatePlus, Wolfram Language function, https://reference.wolfram.com/language/ref/DatePlus.html (updated 2014).
CMS
Wolfram Language. 2007. "DatePlus." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/DatePlus.html.
APA
Wolfram Language. (2007). DatePlus. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DatePlus.html