question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v1] Discussion: Default date format ( YYYY/MM/DD ).

See original GitHub issue

Background In v1, as opposed to previous versioning, everything that handles dates does not receive a format option, but rather forces you to comply with a default one.

Problem The choice of the default date format is YYYY/MM/DD, which, at first glance, seems a rather strange decision as it does not comply with any standard.

The de-facto standard, ISO compliant date format is YYYY-MM-DD which seems a far better choice than the current one, which is also widely implemented in various REST apis, and part of the JSON-Schema standard formats.

Proposition I would purpose to switch to this format as the default one. The sooner this is done ( before v1 is widely adopted/ out of beta ) it will eliminate the need to write multi-format/format-adjusting logic into components dealing with those and keep things simple.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
rstoenescucommented, May 11, 2019

Optional mask and locale will be available in beta.24 for QDate.

4reactions
rstoenescucommented, Feb 14, 2019

Hi, Won’t get into too many details, so this is a high-level overview:

Up to 1.0 we were using the Quasar date utils, which is that “momentjs-like” functionality. It’s good, but beginners can easily mess things up due to the buggy native JS Date object.

We also wanted faster rendering (so avoid parsing and reparsing JS Date objects), and also avoid problems when using SSR. In 0.17 the date component was rendered only on client side because otherwise there would appear hydration errors (time on server may be different than time on client). We wanted (and succeeded) in avoiding all this mess with the native JS Date object by using a String as model only.

The recommended way when instantiating a native JS Date object is to use “/” as separator instead of “-” to avoid the timezone issue. But this doesn’t matter anymore for v1.0.

We got a big pile of work items still needed to be solved before we can take a decision regarding the format (together with you, the developers using Quasar), so please hold on until it comes the turn for this.

Thank you, -Razvan

Read more comments on GitHub >

github_iconTop Results From Across the Web

Format JavaScript date as yyyy-mm-dd - Stack Overflow
The simplest way to convert your date to the yyyy-mm-dd format, is to do this: var date = new Date("Sun May 11,2014"); var...
Read more >
Permanently changing default date format DD-MON-YY to ...
I want to change the default format of date. I wrote NLS_DATE_FORMAT="YYYY-MM-DD" in initXE.ora. when i write show Parameter on SQL Plus in ......
Read more >
date command in busybox not accepting formatted input date
It returns the date in the exact same format as above. But It would not accept this when I use the -s option...
Read more >
date - AngularJS: API
Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter ......
Read more >
Incorrect date format in CSV files import v1.5.12
Having said that, if I change the Date format to say YYYYMMDD, save it to template 9, then press on template 0 the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found