NextDate

NextDate[gran]

gives the next occurring date of the specified granularity type gran.

NextDate[daytype]

gives the next day corresponding to the specified daytype.

NextDate[date,gran]

gives the next date of the given granularity relative to the specified date.

Details and Options

  • NextDate[gran] returns a DateObject expression.
  • In NextDate[gran], the granularity type gran can be any of the following:
  • "Millennium"1000-year period beginning with year XX00
    "MillenniumBeginning01"1000-year period beginning with year XX01
    "Century"100-year period beginning with year XX00
    "CenturyBeginning01"100-year period beginning with year XX01
    "Decade"10-year period including the date
    "Year"year including the date
    "Quarter"3-month quarter including the date
    "Month"month including the date
    "Week"week beginning Monday including the date
    "WeekBeginningSunday"week beginning Sunday including the date
    "Day"day including the date
    "Hour"hour including the date
    "Minute"minute including the date
    "Second"second including the date
  • In NextDate[daytype], the day type specification daytype can be any of the following: "Weekday", "WeekendDay", Monday through Sunday, "MonthFirstDay", "MonthLastDay" and "BusinessDay".
  • The following options can be given:
  • CalendarTypeAutomaticcalendar system for the result
    TimeZone$TimeZonetime zone for the result

Examples

open allclose all

Basic Examples  (3)

Get a date object representing next year:

Get a date object for the next quarter:

Get a date object representing the next decade:

Get a date object representing the month following India's independence date:

Get the next Friday:

NextDate will return the following matching date if the reference date also matches the day type:

Scope  (1)

Date specifications may be a DateObject, DateList or DateString:

Options  (2)

CalendarType  (1)

Get a granular date using the Jewish calendar:

TimeZone  (1)

Get a granular date with a specific time zone:

Properties & Relations  (1)

Tomorrow is equivalent to NextDate["Day"]:

Introduced in 2017
 (11.1)
 |
Updated in 2019
 (12.0)