File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 11<template >
22 <div >
33 <select id =" period" name =" period" @change =" onChange" >
4+ <option value =" last_year" >Last Year</option >
45 <option value =" last_30_days" selected >Last 30 Days</option >
56 <option value =" last_month" >Last Month</option >
67 <option value =" this_year" >This Year</option >
78 </select >
9+ <p v-if =" period === 'last_year'" >
10+ <small >{{ firstDayOfLastYear }} ➜ {{ lastDayOfLastYear }}</small >
11+ </p >
812 <p v-if =" period === 'last_30_days'" >
913 <small >{{ last30Days }} ➜ {{ todayDate }}</small >
1014 </p >
@@ -43,6 +47,24 @@ export default {
4347 month: ' long' ,
4448 }),
4549 last30Days: 0 ,
50+ firstDayOfLastYear: new Date (
51+ new Date ().getFullYear () - 1 ,
52+ 0 ,
53+ 1
54+ ).toLocaleString (' en-GB' , {
55+ day: ' numeric' ,
56+ month: ' long' ,
57+ year: ' numeric' ,
58+ }),
59+ lastDayOfLastYear: new Date (
60+ new Date ().getFullYear () - 1 ,
61+ 11 ,
62+ 31
63+ ).toLocaleString (' en-GB' , {
64+ day: ' numeric' ,
65+ month: ' long' ,
66+ year: ' numeric' ,
67+ }),
4668 }
4769 },
4870 computed: {
You can’t perform that action at this time.
0 commit comments