<template>
<div>
<p>Today is {{ today }}</p>
</div>
</template>
<script>
export default {
data() {
return {
today: ''
}
},
mounted() {
this.today = this.getCurrentDate();
},
methods: {
getCurrentDate() {
let now = new Date();
let year = now.getFullYear();
let month = now.getMonth() + 1;
let day = now.getDate();
return year + "-" + month + "-" + day;
}
}
}
</script>