diff options
| author | Yuval Adam <_@yuv.al> | 2017-10-18 20:51:19 +0300 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2017-10-18 20:51:19 +0300 |
| commit | 12e98d11fad29924dc7ec4aec8b83480cbc5e9d6 (patch) | |
| tree | 32b038f8ce13386cc9fd0e4a9ae98c8cd0b6a864 /Geshem.vue | |
| parent | c017c18e0b5db8c3e0c92e08819e829a7cdc8388 (diff) | |
Show actual date and time
Diffstat (limited to 'Geshem.vue')
| -rw-r--r-- | Geshem.vue | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -1,7 +1,7 @@ <template> <div id="geshem"> - <div id="date">14-10-2017</div> - <div id="time">21:58</div> + <div id="date">{{ date }}</div> + <div id="time">{{ time }}</div> <vue-slider ref="slider" v-model="slider" :min=1 :max=7></vue-slider> </div> </template> @@ -45,6 +45,16 @@ }) } }, + computed: { + date: function () { + var d = this.imgs[this.res][7-this.slider].substr(0, 8); + return `${d.substr(0, 4)}-${d.substr(4, 2)}-${d.substr(6, 2)}`; + }, + time: function () { + var t = this.imgs[this.res][7-this.slider].substr(9, 6); + return `${t.substr(0, 2)}:${t.substr(2, 2)}`; + } + }, created: function () { var vm = this; this.map.on('style.load', function () { |
