Quasar: [Request] Date: Ability to escape characters

Created on 29 Nov 2017  路  2Comments  路  Source: quasarframework/quasar


For the date util, I would like to request the ability to escape characters when formatting the date. Moments.js has this feature, which is documented here.

My use case is that I have a requirement to render the date such as this:
November 29, 2017 at 12:13 pm

To accomplish this currently I have to invoke formatDate() twice:

return `${formatDate(timeStamp, 'MMMM D, YYYY')} at ${formatDate(timeStamp, 'h:mm a')}`

Implementation of an "escape characters feature" would result in not having to invoke formatDate() twice, as well as eliminating the need for template literals (or other form of concatenation).

And thanks again for Quasar and all the work you've put into this! Love the framework :heart:

Most helpful comment

All credits go to @pdanpdan

All 2 comments

Wow, that was fast! Thanks a lot for implementing this @pdanpdan @rstoenescu :tada:

All credits go to @pdanpdan

Was this page helpful?
0 / 5 - 0 ratings