-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'SELECT YEAR(NOW())' works on Chrome but not on Firefox or Safari. #1287
Comments
Additionally I found that SELECT CONVERT(STRING,NOW(),1) Chrome -> 02/01/21 |
Same issue on Safari for both Both work on Version 88.0.705.56 of MS Edge |
A little bit of digging :-) NOW() returns a non standard format, which chrome, safari and edge (V8 engine) can handle, but Firefox and Safari cannot.
This will work on most browser if not all of them.
Now SELECT YEAR(NOW()) will return the current year this allow for queries that will always work |
Thank you so much for looking into this! Changing date format is not a small change for all the implementations out there. The format is replicating how MySQL does it as I recall - but we really need to get firefox and safari working. I will not be able to look at this this week, but hope in the weekend. |
Sticking with a more standard javascript format and providing custom formatters for anything else might be a better way to got and also easier to maintain. My main concern is to have it woking for most (better all) browsers, though I fear going with the MySQL format might make the implementation much more complex and potential become a performance bottleneck :-) |
Any progress on this ? |
@report-zone No progress. PRs welcome. |
Released as part of https://github.com/AlaSQL/alasql/releases/tag/v2.0.1 |
As the title says. Easy to reproduce using 0.6.5 in codepen no data necessary
returns 2021 in chrome and nothing in firefox.
The text was updated successfully, but these errors were encountered: