<p>A brand-new release of <a href="http://dirk.eddelbuettel.com/code/anytime.html">anytime</a> is now on <a href="https://cran.r-project.org/">CRAN</a> following the three earlier releases since mid-September. <a href="http://dirk.eddelbuettel.com/code/anytime.html">anytime</a> 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 <a href="http://dirk.eddelbuettel.com/code/anytime.html">anytime</a> page for a few examples.</p>
<p>With release 0.0.4, we add two nice new features. First, <code>NA</code>, <code>NaN</code> and <code>Inf</code> are now simply skipped (similar to what the corresponding Base R functions do). Second, we now also accept large numeric values so that, _e.g., <code>anytime(as.numeric(Sys.time())</code> also works, effectively adding another input type. We also have squashed an issue reported by the 'undefined behaviour' sanitizer, and the widened the test for when we try to deploy the <a href="http://dirk.eddelbuettel.com/code/gettz.html">gettz</a> package get missing timezone information.</p>
<p>A quick example of the new features:</p>
<div><pre><code><span>anydate</span>(<span>c</span>(<span>NA</span>, <span>NaN</span>, <span>Inf</span>, <span>as.numeric</span>(<span>as.POSIXct</span>(<span>&quot;2016-09-01 10:11:12&quot;</span>))))
[<span>1</span>] <span>NA</span>           <span>NA</span>           <span>NA</span>           <span>&quot;2016-09-01&quot;</span></code></pre></div>
<p>The <code>NEWS</code> file summarises the release:</p>
<blockquote>
<h4>Changes in anytime version 0.0.4 (2016-10-20)</h4>
<ul><li><p>Before converting via <code>lexical_cast</code>, assign to atomic type via template logic to avoid an UBSAN issue (PR <a href="https://github.com/eddelbuettel/anytime/pull/15">#15</a> closing issue <a href="https://github.com/eddelbuettel/anytime/issues/14">#14</a>)</p></li>
<li><p>More robust initialization and timezone information gathering.</p></li>
<li><p>More robust processing of non-finite input also coping with non-finite values such as <code>NA</code>, <code>NaN</code> and <code>Inf</code> which all return <code>NA</code></p></li>
<li><p>Allow numeric <code>POSIXt</code> representation on input, also creating proper <code>POSIXct</code> (or, if requested, <code>Date</code>)</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/2016/10/20#anytime_0.0.4">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>