Creation of date and time data for given years, months, and days

# Here we create the first days of all months in the year 2000:
# By default the time is noon
ISOdate(2000,1:12,1)
 [1] "2000-01-01 12:00:00 GMT" "2000-02-01 12:00:00 GMT"
 [3] "2000-03-01 12:00:00 GMT" "2000-04-01 12:00:00 GMT"
 [5] "2000-05-01 12:00:00 GMT" "2000-06-01 12:00:00 GMT"
 [7] "2000-07-01 12:00:00 GMT" "2000-08-01 12:00:00 GMT"
 [9] "2000-09-01 12:00:00 GMT" "2000-10-01 12:00:00 GMT"
[11] "2000-11-01 12:00:00 GMT" "2000-12-01 12:00:00 GMT"
# To get the start of the date we have to set the hour to midnight:
ISOdate(2000,1:12,1,hour=0)
 [1] "2000-01-01 GMT" "2000-02-01 GMT" "2000-03-01 GMT" "2000-04-01 GMT"
 [5] "2000-05-01 GMT" "2000-06-01 GMT" "2000-07-01 GMT" "2000-08-01 GMT"
 [9] "2000-09-01 GMT" "2000-10-01 GMT" "2000-11-01 GMT" "2000-12-01 GMT"
# We can of course also create a sequence of days:
ISOdate(2000,2,1:29,hour=0)
 [1] "2000-02-01 GMT" "2000-02-02 GMT" "2000-02-03 GMT" "2000-02-04 GMT"
 [5] "2000-02-05 GMT" "2000-02-06 GMT" "2000-02-07 GMT" "2000-02-08 GMT"
 [9] "2000-02-09 GMT" "2000-02-10 GMT" "2000-02-11 GMT" "2000-02-12 GMT"
[13] "2000-02-13 GMT" "2000-02-14 GMT" "2000-02-15 GMT" "2000-02-16 GMT"
[17] "2000-02-17 GMT" "2000-02-18 GMT" "2000-02-19 GMT" "2000-02-20 GMT"
[21] "2000-02-21 GMT" "2000-02-22 GMT" "2000-02-23 GMT" "2000-02-24 GMT"
[25] "2000-02-25 GMT" "2000-02-26 GMT" "2000-02-27 GMT" "2000-02-28 GMT"
[29] "2000-02-29 GMT"
# 'Impossible' dates result in NA:
ISOdate(2000,2,29:31,hour=0)
[1] "2000-02-29 GMT" NA               NA              

Downloadable R script and interactive version

Explanation

The link with the “jupyterhub” icon directs you to an interactive Jupyter1 notebook, which runs inside a Docker container2. There are two variants of the interative notebook. One shuts down after 60 seconds and does not require a sign it. The other requires sign in using your ORCID3 credentials, yet shuts down only after 24 hours. (There is no guarantee that such a container persists that long, it may be shut down earlier for maintenance purposes.) After shutdown all data within the container will be reset, i.e. all files created by the user will be deleted.4

Above you see a rendered version of the Jupyter notebook.5

1

For more information about Jupyter see http://jupyter.org. The Jupyter notebooks make use of the RKernel package.

2

For more information about Docker see https://docs.docker.com/. The container images are run with docker spawner.

3

ORCID is a free service for the authentication of researchers. It also allows to showcase publications and contributions to the academic community such as peer review.. See https://info.orcid.org/what-is-orcid/ for more information.

4

The Jupyter notebooks come with NO WARRANTY whatsoever. They are provided for educational and illustrative purposes only. Do not use them for production work.

5

The notebook is rendered with the help of the nbsphinx extension.