Code Monkey home page Code Monkey logo

Comments (2)

eddelbuettel avatar eddelbuettel commented on June 10, 2024

That is likely build / OS dependent via the system time zone library; I have no control over the one in the Windows build.

> anytime::anytime(c("Nov 1, 2000", "Nov 1, 2005", "Nov 1, 2010", "Nov 1, 2019"))
[1] "2000-11-01 CST" "2005-11-01 CST" "2010-11-01 CDT" "2019-11-01 CDT"
> 

Note, however, that many releases ago we also added an alternate second parser using the R engine so maybe try that?

> anytime::anytime(c("2000-11-01", "2005-11-01", "2010-11-01", "2019-11-01"), useR=TRUE)
[1] "2000-11-01 CST" "2005-11-01 CST" "2010-11-01 CDT" "2019-11-01 CDT"
> 

Lastly, anytime always returns a POSIXct object; and its default format omits hours and minutes at midnight; anydate may be what you wanted here all along if you wanted a Date object.

from anytime.

eddelbuettel avatar eddelbuettel commented on June 10, 2024

so maybe try that

... because R ships its own timezone db which may help you when you OS leaves you in the dark as above.

from anytime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.