GithubHelp home page GithubHelp logo

Comments (4)

eddelbuettel avatar eddelbuettel commented on May 19, 2024

I am not sure what you are expecting. anytime() and anydate() test a fairly large, known, and documented set of formats as a convenience.

If you have an obscure new format, use as.Date() with the format string. If need, loop over several inputs with several formats.

As for %y : I recommend against, just how I recommend against non-iso8661 formats (but living where I do I grudgingly accept the m-d-y variant).

I plan to close this unless you manage to convince that there is shortcoming in anytime() vis a vis its documented behaviour. So far we mostly have you wishing for something we never said we'd do.

from anytime.

eddelbuettel avatar eddelbuettel commented on May 19, 2024

Also

R> library(anytime)
R> anytime::addFormats("%m/%d/%y %H:%M:%S")
R> anytime("03/04/05 06:07:08")
[1] "2005-03-04 06:07:08 CST"
R> 

So I am not sure what the question is here.

from anytime.

Wistarr avatar Wistarr commented on May 19, 2024

I think %m/%d/%y %H:%M:%S was the answer I was looking for. It make the recognition much more precise and resolve the issue I stated.

from anytime.

eddelbuettel avatar eddelbuettel commented on May 19, 2024

Yes, while writing it I realized you may "simply" have confused the formats between anytime() (needs hour/min/sec) and anydate() (does not). All good then.

And yes, executive decision at my end to prefer four-digit years so the default formats are all with %Y.

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.