Git Product home page Git Product logo

Comments (5)

AleksandrSokolov avatar AleksandrSokolov commented on June 10, 2024

@glutamate Also to point 1. The default date time format can be taken from user or system locate parameters.
And can be configured in Configuration parameters of tenant.

Like in Russia we prefer YYYY-MM-DD HH:mm:ss
Example: 2016-02-27 20:24:39

Also i just google about format and Javascript support of date formats.
May be it can be helpfull:

Javascript standard https://www.ecma-international.org/ecma-262/11.0/index.html#sec-date-time-string-format

Javascript library https://momentjs.com/

from saltcorn.

glutamate avatar glutamate commented on June 10, 2024

Yes, there are several big issues here that I'm trying to think through. One is that for many countries the date format can be guessed from the language, but this is not the case in the UK (uses the European day convention rather than the American, which is default for English language). The other issue is time zone that I will probably have to deal with at some point.

from saltcorn.

glutamate avatar glutamate commented on June 10, 2024

improved in #336 and #337 - date formate now from locale. UK is still a problem.

from saltcorn.

AleksandrSokolov avatar AleksandrSokolov commented on June 10, 2024

@glutamate According https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl

You can use combination of language and Country like log("en-US");
// expected output: 5/24/2012 26,254.39

So I think will solve problem with UK.

from saltcorn.

glutamate avatar glutamate commented on June 10, 2024

There is now a format fieldview for dates. Standard ones try to match user's locale

from saltcorn.

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.