Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
A paclet that contains functions for date and time
Contributed by: Peter Cullen Burbery
This paclet extends the date and time functionality of Mathematica by adding functionality for leap years and leap days. The paclet also includes functionality for ISO week dates.
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["PeterBurbery/DateTime"]
To load the code after installation, evaluate this code:
Needs["PeterBurbery`DateTime`"]
Do the computation for the next leap year:
In[1]:= | ![]() |
Out[1]= | ![]() |
Do the computation for the previous leap year:
In[2]:= | ![]() |
Out[2]= | ![]() |
Do the computation to find what year will be 1000 leap years from now:
In[3]:= | ![]() |
Out[3]= | ![]() |
Do the computation to find what year was 10 000 leap years ago:
In[4]:= | ![]() |
Out[4]= | ![]() |
Build a table of leap years up to 54:
In[5]:= | ![]() |
Out[5]= | ![]() |
Build a table of leap years before 1600:
In[6]:= | ![]() |
Out[6]= | ![]() |
Find the leap year day, or Bissext or bissextus in a leap year:
In[7]:= | ![]() |
Out[7]= | ![]() |
Find the next leap year day:
In[8]:= | ![]() |
Out[8]= | ![]() |
Find the previous leap day:
In[9]:= | ![]() |
Out[9]= | ![]() |
Add and take away leap days:
In[10]:= | ![]() |
Out[10]= | ![]() |
In[11]:= | ![]() |
Out[11]= | ![]() |
In[12]:= | ![]() |
Out[12]= | ![]() |
List leap days:
In[13]:= | ![]() |
Out[13]= | ![]() |
In[14]:= | ![]() |
Out[14]= | ![]() |
In[15]:= | ![]() |
Out[15]= | ![]() |
Find the ISO Week Day string:
In[16]:= | ![]() |
Out[16]= | ![]() |
Find the date for Christmas in 2022:
In[17]:= | ![]() |
Out[17]= | ![]() |
Find a date object from an ISO Week Date list:
In[18]:= | ![]() |
Out[18]= | ![]() |
Go from an ISO timestamp to a DateObject:
In[19]:= | ![]() |
Out[19]= | ![]() |
In[20]:= | ![]() |
Out[20]= | ![]() |
In[21]:= | ![]() |
Out[21]= | ![]() |
Do the computation to find the date of Easter Sunday:
In[22]:= | ![]() |
Out[22]= | ![]() |
Do the computation to find the date of Easter Sunday for a range of years:
In[23]:= | ![]() |
Out[23]= | ![]() |
Do the computation for Easter Sunday based on the calendar of the Greek Orthodox church:
In[24]:= | ![]() |
Out[24]= | ![]() |
Do the computation to find the ISO week date then convert the string to a DateObject:
In[25]:= | ![]() |
Out[25]= | ![]() |
In[26]:= | ![]() |
Out[26]= | ![]() |
Use the paclet CodeEquivalenceUtilities to verify this is code-equivalent to Today:
In[27]:= | ![]() |
In[28]:= | ![]() |
Out[28]= | ![]() |
Wolfram Language Version 13.2