Codync
무료 오픈소스 1:1 대안, Grok Bot과 Muse 대신
An implementation of the Temporal date and time model of ECMAScript, the language standard ECMA-262 behind JavaScript, in R, with a native C core: Instant, ZonedDateTime, PlainDateTime, PlainDate, Pla
개발 도구GitHub @pedrobtz온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
저장소 정보는 아직 수집하지 않았습니다.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
An implementation of the Temporal date and time model of ECMAScript, the language standard ECMA-262 behind JavaScript, in R, with a native C core: Instant, ZonedDateTime, PlainDateTime, PlainDate, PlainTime, PlainYearMonth, PlainMonthDay, Duration and Now, in the ISO 8601 calendar, with the time zones of the Internet Assigned Numbers Authority (IANA) read from the same database that base R uses. Values are stored exactly in R vectors, arithmetic is done over the specifications full ranges with e
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Dates and times are hard to get right. A day is not always 24 hours, one month after 31 January is not a date, a clock time can happen twice or not at all, and the same moment is a different date in Tokyo than in New York. Most code gets these cases right by accident, or not at all.
Temporal is JavaScript’s answer: a date and time API designed by the committee that standardises the language, specified to the last nanosecond and tested by thousands of conformance tests. zutempo brings Temporal to R.
The right type for each job. A plain_date() is a date on a
calendar, a plain_time() a time on a wall clock, an instant() an
exact moment, a zoned_date_time() a moment in a time zone, and a
duration() an amount of time. Each does what it says, and never
silently becomes another.
Arithmetic you can trust. Adding a month, a day or 24 hours each mean what they should, across month ends, leap years and clock changes, and the ambiguous cases ask you how to resolve them instead of guessing.
The same answers everywhere. zutempo follows the Temporal specification operation by operation, so a result in R is the result in a browser or in Node. It is checked against test262, the specification’s own conformance suite.
At home in R. Values are vectors with NA, fit in data frames,
convert to and from Date and POSIXct, and read time zones from the
same database base R uses. The engine is in C, with no runtime
dependencies.
zutempo is not on CRAN yet. You can install the development version from GitHub:
# install.packages("pak")
pak::pak("pedrobtz/zutempo")
library(zutempo)
A team meets every day at 9:30 in New York. Clocks go forward on the night of 7 March, so the next meeting is one day later, but only 23 hours later:
meeting <- zoned_date_time("2026-03-07T09:30[America/New_York]")
temporal_add(meeting, "P1D")
#> <zutempo_zoned_date_time[1]>
#> [1] 2026-03-08T09:30:00-04:00[America/New_York]
temporal_until(meeting, temporal_add(meeting, "P1D"))
#> <zutempo_duration[1]>
#> [1] PT23H
Where is everyone else at that moment?
temporal_with_time_zone(meeting, c("Europe/Lisbon", "Asia/Tokyo"))
#> <zutempo_zoned_date_time[2]>
#> [1] 2026-03-07T14:30:00+00:00[Europe/Lisbon]
#> [2] 2026-03-07T23:30:00+09:00[Asia/Tokyo]
Calendar arithmetic knows that months have different lengths:
due <- plain_date(c("2026-01-31", "2026-03-31", "2026-05-15"))
temporal_add(due, "P1M")
#> <zutempo_plain_date[3]>
#> [1] 2026-02-28 2026-04-30 2026-06-15
temporal_until(plain_date("2026-01-31"), "2026-12-25", largest_unit = "month")
#> <zutempo_duration[1]>
#> [1] P10M25D
And durations are values you can round, compare and total:
temporal_round(duration(minutes = 200), largest_unit = "hour")
#> <zutempo_duration[1]>
#> [1] PT3H20M
duration("PT90M") < duration("PT2H")
#> [1] TRUE
temporal_total(duration("P1M"), "day", relative_to = "2026-02-01")
#> [1] 28
Every function follows one naming rule: a Temporal type is a constructor
(plain_date()), a method is temporal_ and its name
(temporal_add()), and a property is a function of its name (year(),
hours_in_day()). If you know Temporal, you already know zutempo.
zutempo is an implementation of the work of the TC39 Temporal champions, who designed the API and wrote its specification and its test262 tests. temporal-polyfill is the reference zutempo is checked against, and time zones come from the IANA time zone database. lubridate and clock showed how much R users care about getting dates and times right.