Giter Site home page Giter Site logo

Comments (3)

scottgonzalez avatar scottgonzalez commented on May 15, 2024

Wouldn't allowing the user to customize the actual tokens break interoperability between plugins? I'm all for using an existing format, but I don't think it should be customizable.

from globalize.

poswald avatar poswald commented on May 15, 2024

I was thinking more along the lines of a mapping between whatever formatting string is passed and the one used here. Something such that you could pass these in as the formatting string into formatDate(value, format, culture) and it would know how to parse the formatting string. I wouldn't want to have a second set of culture-coded formats.

I want a culturally ignorant mode where I just set it up so that it uses whatever settings the server is using to render the html. Sort of a server defined custom culture I guess. Perhaps I just need a utility to map the server's format strings over to a culture once.

It could be that, for instance, the Django locales map to these cultures and we can simply assume that a date output by the ja-JP culture in jquery.global will parse correctly by the ja-JP locale in Django when submitted as a form field. That's a bit of a leap of faith though, and a whole lot of work to double-check.

from globalize.

jzaefferer avatar jzaefferer commented on May 15, 2024

A JS date library can't accomodate every serverside library, so eventually there has to be some kind of mapping.

from globalize.

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.