clock
Comprehensive date-time library for R with calendar and time point types
clock is turning calendar conventions lubridate hard-coded into parameterized types.
◆Recent moves
- 1y ago
Parsing switches to character widths; tzdb 0.5.0 required
Follows the upstream date library in making %Y, %F, %G and %c parse four characters rather than four digits, which breaks negative years under %Y-%m-%d, and raises the floors to tzdb 0.5.0 and R 4.0.0. A correctness alignment that users with historical dates must act on.
View source ↗ - 1y ago
diff() method added for time points and calendars
Adds diff() methods that always return durations, including for empty input, alongside compiler fixes for older gcc. Small, but it closes a type-consistency gap that matters in a package whose premise is predictable types.
View source ↗ - 2y ago
Internal C++ cleanup for CRAN warnings
Replaces a non-API C entry point and silences a templated-constructor warning reported by CRAN. Compliance work with no user-facing effect.
View source ↗ - 3y ago
year_week_day() calendar and spanning sequences added
⚡ SPARKThe high point of the visible history: a new parameterized week-based calendar, sequence generators spanning a vector's full range, and low-level helpers for time zone transitions, plus a breaking change to how durations and time points are stored. Everything since has been maintenance.
View source ↗ - 4y ago
Zero-length sequences allowed; dependency floors raised
Lets date_seq() and the seq() methods return a size-zero result when from is past to rather than erroring, matching rlang conventions, and fixes as.POSIXct() precision promotion. The rest is dependency floor-raising across tzdb, vctrs, rlang and cpp11.
View source ↗ - 4y ago
date_count_between() and duration modulus arithmetic
Adds counting of whole units between two dates, covering common cases like age in years, and defines modulus and integer division on durations. Fills in arithmetic that users previously hand-rolled.
View source ↗