Created
November 10, 2017 09:27
-
-
Save nikkanetiya/ae78c549683985cd6c59b4ba82959edc to your computer and use it in GitHub Desktop.
Vue.js Filter to Format DateTime string to readable/custom format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import moment from 'moment' | |
Vue.filter('formatDate', function (value) { | |
if (value) { | |
return moment(String(value)).format('MM/DD/YYYY hh:mm') | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment