summaryrefslogtreecommitdiff
path: root/Geshem.vue
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2017-10-18 20:51:19 +0300
committerYuval Adam <_@yuv.al>2017-10-18 20:51:19 +0300
commit12e98d11fad29924dc7ec4aec8b83480cbc5e9d6 (patch)
tree32b038f8ce13386cc9fd0e4a9ae98c8cd0b6a864 /Geshem.vue
parentc017c18e0b5db8c3e0c92e08819e829a7cdc8388 (diff)
Show actual date and time
Diffstat (limited to 'Geshem.vue')
-rw-r--r--Geshem.vue14
1 files changed, 12 insertions, 2 deletions
diff --git a/Geshem.vue b/Geshem.vue
index 897f88f..8f9bba0 100644
--- a/Geshem.vue
+++ b/Geshem.vue
@@ -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 () {