This section provides pointers to resources on working with dates and times in R.
The following Wikipedia articles provide background information and links to important abbreviations, conventions, and corresponding standards on time:
Calendars are systems for organizing dates and units of time for religious, commercial, administrative, social, or scientific purposes. The year “2021” is defined by the Gregorian calendar used in most of the world today (i.e., as of 2021-06-15).
It was introduced in October 1582, as a revision of the Julian calendar.
UTC stands for Universal Time, Coordinated, is the successor of Greenwich Mean Time (GMT) and does not change with changing seasons (i.e., uses no daylight saving time, DST).
ISO 8601 provides an international standard covering the exchange of date- and time-related data.
Leap year defines which calendar years contain an additional day (as February, 29, thus containing 366 days, rather than 365).
POSIX (aka. IEEE 1003 or ISO/IEC 9945) stands for Portable Operating System Interface and provides standards for maintaining compatibility between computer operating systems (based primarily on Unix).
Unix time explains how the Unix epoch was defined as 00:00:00 UTC on 1970-01-01 (1st of January 1970).
Other time-related abbreviations include AD vs. BC and AM vs. PM. As it happens, “12 AM” refers to midnight (00:00) and “12 PM” refers to noon (12:00).
There are several dedicated R packages for parsing dates and times:
anytime is an anything to “POSIXct” or “Date” converter (without requiring a
chron creates objects that allow calculations with dates and times, but ignore local options like time-zones, daylight saving time, etc.
hms provides a simple class for storing durations or time-of-day values and displaying them in the hh:mm:ss format. The hms package (Müller, 2020) is part of the tidyverse (see https://hms.tidyverse.org).
parsedate makes the very general date parsing utility from the git version control software available in R.
The following articles in The Stanford Encyclopedia of Philosophy provide readable introductions into the philosophy of time:
Since this chapter began with St. Augustine’s notorious quote, here is a philosophical wrap-up worth reading:
- What is time? (by John D. Norton, 2018-02-14) provides a lucid and sobering perspective on the nature of (seemingly deep questions about) time.
Finally, a remarkable feature of date and time is that every thing or event in our ordinary world has a beginning and an end.
This chapter ends here.
[10_time.Rmd updated on 2021-06-15 15:18:58 by hn.]