Git Product home page Git Product logo

Comments (3)

alan-knight avatar alan-knight commented on August 29, 2024

This is infeasible. It comes up a few times as wanting to parse a Date like 20150429, but that's not a good use of this library. This is for internationalization. If you want to read a hard-coded datetime format with fixed length fields you can do that much, much more efficiently. This expects to print the fields in many different ways depending on locale information, possibly not in the same order, and the field specifies are not interpreted literally. That is, MM does not necessarily mean a padded two digit date, so if there are no delimiters we really can't handle it.

from i18n.

blevinstein avatar blevinstein commented on August 29, 2024

For others looking for a solution to this, DateTime.parse provides this capability.
https://api.dartlang.org/stable/1.24.3/dart-core/DateTime/parse.html

from i18n.

alan-knight avatar alan-knight commented on August 29, 2024

Well that's interesting, I didn't realize that. Thanks for pointing it out.

from i18n.

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.