[Rd] Proposal: Internal as.Date.POSIXct()

Joshua Ulrich jo@h@m@ulrich @ending from gm@il@com
Wed Oct 31 12:30:20 CET 2018

I would like to propose a .Internal() POSIXct2Date() function, similar
to do_POSIXlt2D() in src/main/datetime.c.  I created a working
prototype, which is now included in Dirk Eddelbuettel's RApiDatetime


This prototype is a combination of asPOSIXlt and POSIXlt2D from R
Core.  The functions are essentially concatenated, with the extraneous
parts removed.  Directly converting from POSIXct to Date uses less
memory and is roughly twice as fast.

You can find the relevant bits in the commit on GitHub:

Would someone on R Core be interested in adding this function?  If so,
I can create a patch that includes all the necessary code additions
needed to make it a .Internal() function.

Thanks for your consideration!


Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com
R/Finance 2018 | www.rinfinance.com

More information about the R-devel mailing list