Skip to content

Instantly share code, notes, and snippets.

@bachhm-dev
Created August 30, 2020 08:56
Show Gist options
  • Select an option

  • Save bachhm-dev/49000761e418fa03106f4dd88dc4ea84 to your computer and use it in GitHub Desktop.

Select an option

Save bachhm-dev/49000761e418fa03106f4dd88dc4ea84 to your computer and use it in GitHub Desktop.
<template>
<div id="app">
<img alt="Vue logo" src="./assets/logo.png" />
<HelloWorld msg="Welcome to Your Vue.js App" />
{{ new Date() | formatUnix}}
</div>
</template>
<script>
import HelloWorld from "./components/HelloWorld.vue";
import moment from "moment";
export default {
name: "App",
components: {
HelloWorld,
},
filters: {
formatUnix(value) {
if (value) {
return moment(value).format("DD/MM/YYYY");
}
},
},
};
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment