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.

🐛 [BUG]: date.formatDate does not allow [ ] in format string

See original GitHub issue

What happened?

So the token matcher hits on [ ] and [ ] alone, ( ) and { } are a lot in a format string only [ ] does not work. image

https://github.com/quasarframework/quasar/blob/82adfbd8997066bec2fcee09d3435f027eafe30e/ui/src/utils/date.js#L13

What did you expect to happen?

If the other kinds of brackets work [ ] should also work for formatting.

Reproduction URL

https://jsfiddle.net/hfnrvo61/

How to reproduce?

date.formatDate(now, '[ww] dd. DD.MM.YY')

Flavour

Quasar CLI (@quasar/cli | @quasar/app)

Areas

Plugins (quasar)

Platforms/Browsers

Firefox, Chrome, Safari, Microsoft Edge, iOS, Android, Electron, Other

Quasar info output

No response

Relevant log output

No response

Additional context

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
pdanpdancommented, Feb 28, 2022

Until you mentioned I was convinced it is somewhere in the docs. I’ll check and make a PR if it is missing.

0reactions
hinogicommented, Feb 28, 2022

organizational blindness, we all been there. Much appreciated the explanation

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I format a date in JavaScript? - Stack Overflow
The locale and options arguments let applications specify the language whose formatting conventions should be used, and allow some customization of the ...
Read more >
6 Ways to Fix Dates Formatted as Text in Excel
6 ways to fix dates formatted ast text in Excel, plus a bonus technique using Power Query to fix various formats.
Read more >
Day of year bug - format date/time string and scan from string?
I've noticed that the day of year returned by "Format Date/Time String.vi" starts with a value of 1 for Jan-1 while "Scan from....
Read more >
Week Year ("YYYY") should not be used for date formatting
Exceptions. Date date = new SimpleDateFormat("yyyy/MM/dd").parse("2015/12/31"); String result ...
Read more >
DateFormat (Java Platform SE 7 ) - Oracle Help Center
DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
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