![]() ![]() They’re equivalent until you start working with zoned-times.Ī zoned-time is a time point paired with a time zone. There are two important types of time in clock: sys-time and naive-time. It combines a duration with a “clock” that defines when to start counting and what exactly to count. Durations are important because they form the backbone of clock it’s relatively rare to use them directly.Ī time point records an instant in time, like “1:24pm January 1st 2015”. Bigger units are defined in terms of seconds, i.e. 1 day is 86400 seconds and 1 year is 365.2425 days. Some types are more efficient than others at particular operations, and it is only when all 4 are taken as a whole do you get a complete date time library.Ī duration counts units of time, like “5 years” or “6 nanoseconds”. There are four key classes in clock, inspired by the design of the C++ date and chrono libraries. Is built on the C++ date library, which provides a correct and high-performance backend. Requires explicit handling of invalid dates (e.g. what date is one month after January 31st?) and nonexistent or ambiguous times (caused by daylight saving time issues). Implements a high level API for R’s native date (Date) and date-time (POSIXct) classes that lets you get productive quickly without having to learn the details of clock’s new date-time types. Provides a new family of date-time classes (durations, time points, zoned-times, and calendars) that partition responsibilities so that you only have to think about time zones when you need them. In addition to these tools for manipulating date-times, clock provides entirely new date-time types which are structured to reduce the agony of working with time zones as much as possible. It is packed with features, including utilities for: parsing, formatting, arithmetic, rounding, and extraction/updating of individual components. Clock is an R package for working with date-times. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |