Skip to content
Snippets Groups Projects
Commit 220f75ac authored by D4rkHeart's avatar D4rkHeart
Browse files

[Refactor] Make `getFormatedDate()` pure

parent 0276cd20
No related branches found
No related tags found
1 merge request!20Sorting by birth date not working
......@@ -208,9 +208,8 @@ export default {
}
},
getFormatedDate (value) {
let dateTimeParts = value.split(/[- :]/)
dateTimeParts[1]--
let date = new Date(...dateTimeParts)
const dateTimePart = value.split(/[- :]/)[1] - 1
const date = new Date(dateTimePart)
return date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + ' à ' + ('0' + date.getHours()).slice(-2) + ':' + ('0' + date.getMinutes()).slice(-2)
},
customSort: function (items, column, descending) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment