Coder Social home page Coder Social logo

Comments (3)

eddelbuettel avatar eddelbuettel commented on May 27, 2024

Please see old issue tickets. This is a duplicate.

from anytime.

eddelbuettel avatar eddelbuettel commented on May 27, 2024

# Ambiguities
The \pkg{anytime} package is designed to operate heuristically on a number of _plausible_
and _sane_ formats. This cannot possibly cover all conceivable cases.
## North America versus the world
In general, \pkg{anytime} tries to gently nudge users towards ISO 8601 order of _year_
followed by _month_ and _day_. But for example in the United States, another prevalent
form insists on month-day-year ordering. As many users are likely to encounter such input
format, \pkg{anytime} accomodates this use provided a separator is used: input with either
a slash (`/`) or a hyphen (`-`) is accepted and parsed.

from anytime.

eddelbuettel avatar eddelbuettel commented on May 27, 2024

Also, you format string is plain wrong. %H is for 24 hour clocks. You may have meant %I. But I wouldn't rely on 12h times with am and pm. Use ISO formats with 24 hours if at all possible.

Lastly, you appear to have some hope that the parsing has some metaphysical knowledge of whether

02/03

is March 2nd or February 3rd. It doesn't. First match wins, which is why the encoded preference for US formats along with slashes or hyphes is noted. If you add a European format it will be tried first and matches. That is a feature, not a bug.

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.