Created
February 25, 2017 19:26
-
-
Save seanbuscay/cbe3a686c9021d32f408b9989e74b666 to your computer and use it in GitHub Desktop.
Revisions
-
Sean Buscay revised this gist
Feb 25, 2017 . 1 changed file with 26 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ new Vue({ el: '#app', data: { items: [ // unix timestamps 1481889223, 1452945223, 1450871623, undefined, 1450353223, 1450270423, ] }, methods: { moment: function (date) { return moment(date); }, date: function (date) { return moment(date).format('MMMM Do YYYY, h:mm:ss a'); } }, filters: { moment: function (date) { return moment(date).format('MMMM Do YYYY, h:mm:ss a'); } } }) -
Sean Buscay created this gist
Feb 25, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ <div id="app"> <ul> <li v-for="item in items"> <p>{{ moment(item).format('MMMM Do YYYY, h:mm:ss a') }}</p> <p class="method">{{ date(item) }}</p> <p class="filter">{{ item | moment }}</p> </li> </ul> </div>