Mon, 07 Nov 2016

anytime 0.1.0: New features, some fixes

A new release of anytime is now on CRAN following the four releases in September and October.

anytime aims to convert anything in integer, numeric, character, factor, ordered, ... format to POSIXct (or Date) objects -- and does so without requiring a format string. See the anytime page for a few examples.

Release 0.1.0 adds several new features. New functions utctime() and utcdate() parse to coordinated universal time (UTC). Several new formats were added. Digit-only formats like 'YYYYMMDD' with or without 'HHMMSS' (or even with fractional secodns 'HHMMSS.ffffff') are supported more thoroughly. Some examples:

R> library(anytime)
R> anytime("20161107 202122")   ## all digits
[1] "2016-11-07 20:21:22 CST"
R> utctime("2016Nov07 202122")  ## UTC parse example
[1] "2016-11-07 14:21:22 CST"
R> 

The NEWS file summarises the release:

Changes in anytime version 0.1.0 (2016-11-06)

  • New functions utctime() and utcdate() were added to parse input as coordinated universal time; the functionality is also available in anytime() and anydate() via a new argument asUTC (PR #22)

  • New (date)time format for RFC822-alike dates, and expanded existing datetime formats to all support fractional seconds (PR #21)

  • Extended functionality to support not only ‘YYYYMMDD’ (without a separator, and not covered by Boost) but also with ‘HHMM’, ‘HHMMSS’ and ‘HHMMSS.ffffff’ (PR #30 fixing issue #29)

  • Extended functionality to support ‘HHMMSS[.ffffff]’ following other date formats.

  • Documentation and tests have been expanded; typos corrected

  • New (unexported) helper functions setTZ, testOutput, setDebug

  • The testFormat (and testOutput) functions cannot be called under RStudio (PR #27 fixing issue #25).

  • More robust support for non-finite values such as NA, NaN or Inf (Fixing issue #16)

Courtesy of CRANberries, there is a comparison to the previous release. More information is on the anytime page.

For questions or comments use the issue tracker off the GitHub repo.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/anytime | permanent link

gettz 0.0.3

A minor release 0.0.3 of gettz arrived on CRAN two days ago.

gettz provides a possible fallback in situations where Sys.timezone() fails to determine the system timezone. That can happen when e.g. the file /etc/localtime somehow is not a link into the corresponding file with zoneinfo data in, say, /usr/share/zoneinfo.

This release adds a second #ifdef to permit builds on Windows for the previous R release (ie r-oldrel-windows). No new code, or new features.

Courtesy of CRANberries, there is a comparison to the previous release.

More information is on the gettz page. For questions or comments use the issue tracker off the GitHub repo.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/gettz | permanent link