"Date" (interpreter type)

Date in any standard format or in natural language.

DetailsDetails

  • "Date" can be used in Interpreter and related constructs, including deployed smart form fields.
  • Use of "Date" requires connectivity to the Wolfram Cloud.

Allowed FormsAllowed Forms

  • 2010/21/04year/day/month
    21/04/2010day/month/year
    04/21/2010month/day/year
    2010/04/21year/month/day
    Sep 14, 1756comma separated
    1989-11-13hyphen separated
    todaydates in natural language
    jan 1stdates including natural language
    1989just a year
    marchjust a month
    apr 2011a specific month
    9 shaban 1435an Islamic date
    26 Kislev 5775a Jewish date

Restriction SpecificationsRestriction Specifications

  • Restricted["Date",{{choices1,}}]one among choices
    Restricted["Date",max]a date before max
    Restricted["Date",{min,max}]a date between min and max
    Restricted["Date",{min,max,unit}]a date between min and max, with resolution unit

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Interpret dates:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Interpret dates in natural language:

In[1]:=
Click for copyable input
Out[1]=

Restrict the value to be within a given range:

In[1]:=
Click for copyable input
Out[1]=

Interpret dates in a number of different formats and calendars:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

Set a resolution:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Dates that involve a time are not accepted:

In[1]:=
Click for copyable input
Out[1]=