Skip to content

Commit 2704bd0

Browse files
authored
Update to latest tzdb (what will become tzdb 0.5.0) (#387)
* Apply `not_a_century` change HowardHinnant/date@0ef86f1 * Apply `read_signed()` related patches The upstream `date::read_signed()` has changed and now includes a `+` or `-` in the actual count of parsed values. This actually means that `%Y` can no longer parse `-1000` as a year without it explicitly being `%5Y`, which is something we need to add tests for if this change is here to stay. Without this change, many tests break because `%z` no longer parses correctly. We preemptively look for `-` and `+`, but previously the fallthrough `read()` call would consume them without reducing the `M` max count and now it no longer does, so we have to `is.get()` to advance manually. HowardHinnant/date@ab37c36 HowardHinnant/date@5d22595 * Apply dead code removal change HowardHinnant/date@cd3c579 * Add remote on tzdb * Let cpp11.R regenerate itself * Apply `rs{}` to `ru{}` related changes HowardHinnant/date@32ecb2a * NEWS bullet * Fix indentation issue clangd identified * Add test for negative year behavior * NEWS bullet
1 parent 289bed3 commit 2704bd0

File tree

5 files changed

+135
-457
lines changed

5 files changed

+135
-457
lines changed

DESCRIPTION

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Imports:
2020
cli (>= 3.6.1),
2121
lifecycle (>= 1.0.3),
2222
rlang (>= 1.1.0),
23-
tzdb (>= 0.4.0),
23+
tzdb (>= 0.4.0.9000),
2424
vctrs (>= 0.6.1)
2525
Suggests:
2626
covr,
@@ -33,7 +33,7 @@ Suggests:
3333
withr
3434
LinkingTo:
3535
cpp11 (>= 0.5.1),
36-
tzdb (>= 0.4.0)
36+
tzdb (>= 0.4.0.9000)
3737
VignetteBuilder:
3838
knitr
3939
Config/build/compilation-database: true
@@ -45,3 +45,5 @@ Encoding: UTF-8
4545
LazyData: true
4646
Roxygen: list(markdown = TRUE)
4747
RoxygenNote: 7.3.2
48+
Remotes:
49+
r-lib/tzdb

NEWS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# clock (development version)
22

3+
* `%Y`, `%F`, `%G`, and `%c` now parse up to 4 _characters_ by default, rather
4+
than 4 _digits_. This is more in line with the C++20 specification and was a
5+
change made in the upstream `<date.h>` parser. Practically, this means that
6+
negative years such as `-1000-01-01` will no longer parse with `%Y-%m-%d`, and
7+
instead requires `%5Y-%m-%d` to capture the leading `-` (#387).
8+
9+
* tzdb >=0.5.0 is required. Note that older versions of clock are not compatible
10+
with tzdb 0.5.0 and above, so if you are having issues (particularly with
11+
parsing) please make sure that both clock and tzdb are fully updated (#387).
12+
313
* Fixed `-Wdeprecated-literal-operator` reported by clang (#386,
414
@MichaelChirico).
515

0 commit comments

Comments
 (0)