Software
clock

clock

A Date-Time Library for R

R

clock is an R package for working with date-times, providing tools for parsing, formatting, arithmetic, rounding, and extracting or updating components. It offers both a high-level API for R’s native Date and POSIXct types and a low-level API with new date-time classes designed to minimize time zone complications.

The package introduces four core date-time types (durations, time points, zoned-times, and calendars) that partition responsibilities for different operations. It requires explicit handling of invalid dates and ambiguous times caused by daylight saving time, preventing silent errors. Built on the high-performance C++ date library, clock efficiently handles irregular periods like months and quarters while providing correct time zone conversions.

Contributors