Do you want to use vuejs or Vuex? actions is a reserved to register actions on a Vuex store. You can find below how to translate your code in a simple Vue instance.
index.html
<body>
<div id="app"></div>
</body>
main.js
import Vue from "vue";
new Vue({
el: "#app",
template: "<p> {{ end }}</p>",
data: {
start: null
},
mounted() {
this.start = Date.now();
},
computed: {
end() {
return this.start + 604800000;
}
}
});
For this example, start is calculated when the vue instance is mounted on the <div id="app"></div> block. end is a computed property that will be calculated as soon as the start property value has changed.
Have a look at here, they describe a similar example.