Customize date string delimiter
See original GitHub issueFeature request:
By default, we use vue-i18n, the string formatted use slash as delimiter, 2018/05/01
, we hope to customize it as 2018-05-01
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Custom date and time format strings | Microsoft Learn
Learn to use custom date and time format strings to convert DateTime or DateTimeOffset values into text representations, or to parse strings ......
Read more >How to format a date/datime having optional separator and ...
I´m giving the user the power to choose the date format and the date separator that will be used.
Read more >Date and Time Literals - MariaDB Knowledge Base
A DATE string is a string in one of the following formats: 'YYYY-MM-DD' or 'YY-MM-DD' . Note that any punctuation character can be...
Read more >Everything You Need to Know About Date in JavaScript
In JavaScript, if you want to use a date string, you need to use a format that's accepted worldwide. One of these formats...
Read more >Date and time - The Modern JavaScript Tutorial
The character "T" is used as the delimiter. ... The call to Date.parse(str) parses the string in the given format and returns the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
what would be the problem with the standard, if vue-i18n would introduce e.g.
separator
as an option fordateTimeFormats
(as in https://kazupon.github.io/vue-i18n/guide/datetime.html) to allow any custom separator? It is good, to default to a standard, but it should be possible, to customize that.@fengerzh you can just add a custom filter like so.
filters: { delimiter(value: string) { return value.replace(/\//g, '-'); } }