<p>A new version of the <a href="http://dirk.eddelbuettel.com/code/anytime.html">anytime</a> package is now on <a href="https://cran.r-project.org/">CRAN</a>. It marks the eleventh release since the inaugural version late last summer.</p>
<p><a href="http://dirk.eddelbuettel.com/code/anytime.html">anytime</a> is a very focused package aiming to do just one thing really well: to convert anything in integer, numeric, character, factor, ordered, ... format to either POSIXct or Date objects -- and to do so without requiring a format string. See the <a href="http://dirk.eddelbuettel.com/code/anytime.html">anytime</a> page, or the <a href="https://github.com/eddelbuettel/anytime">GitHub README.md</a> for a few examples.</p>
<p>This release brings a little more consistency to how numeric or integer arguments are handled. Previously, we were overly eager in accepting something such as 20150605 (i.e. today) as a (numerical or integer) input to both <code>anytime()</code> and <code>anydate()</code>. That is well-intentioned, but ultimately foolish. We relied on heuristic cutoffs to determine whether input was &quot;meant to be&quot; a date or time offset. There lies madness. We now differentiate whether we were called via <code>anytime()</code> (in which case numerical data is second offset to the epoch, just <code>as.POSICct()</code>) or <code>anytime()</code> (in which case it is days offset to the (date) epoch, just like <code>as.Date()</code>). The previous behaviour can be restored via a options, both function-local as well as global are supported. And of course, there is no change for all other (and more common) input formats, notably <code>character</code> or <code>factor</code>. A full list of changes follows.</p>
<blockquote>
<h4>Changes in anytime version 0.3.0 (2017-06-05)</h4>
<ul><li><p>Numeric input is now always an offset to epoch, with <code>anytime()</code> using seconds, and <code>anydate()</code> using dates. (<a href="https://github.com/eddelbuettel/anytime/pull/65">#65</a> fixing <a href="https://github.com/eddelbuettel/anytime/issues/63">#63</a>).</p></li>
<li><p>Old behaviour can be re-enabled with an option also supporting a global setting <code>getOption(&quot;anytimeOldHeuristic&quot;)</code></p></li>
<li><p>RStudio versions 1.1.129 or later can run all functions without fear of crashing due to a change in their use of Boost.</p></li>
<li><p>Replaced <code>init.c</code> with registration code inside of <code>RcppExports.cpp</code> thanks to Rcpp 0.12.11.</p></li>
</ul></blockquote>
<p>Courtesy of <a href="http://dirk.eddelbuettel.com/cranberries/">CRANberries</a>, there is a comparison to <a href="http://dirk.eddelbuettel.com/cranberries/2017/06/05#anytime_0.3.0">the previous release</a>. More information is on the <a href="http://dirk.eddelbuettel.com/code/anytime.html">anytime</a> page.</p>
<p>For questions or comments use the <a href="https://github.com/eddelbuettel/anytime/issues">issue tracker</a> off the <a href="https://github.com/eddelbuettel/anytime">GitHub repo</a>.</p>
<p>
This post by <a href="http://dirk.eddelbuettel.com/">Dirk Eddelbuettel</a> originated on his <a href="http://dirk.eddelbuettel.com/blog/">Thinking inside the box</a> blog. Please report excessive re-aggregation in third-party for-profit settings.
</p><p>