Explorar el Código

:bug: fixed undefined func for events and exhibitions in sidebars | #115

tags/0.9.0
J hace 4 años
padre
commit
0982330d2a

+ 2
- 2
vue-theme/src/components/sidebars/events.vue Ver fichero

32
     },
32
     },
33
     methods: {
33
     methods: {
34
         dateFrom(unix, includeTime) {
34
         dateFrom(unix, includeTime) {
35
-            const f = includeTime ? 'dd-m-yy h:MM' : 'dd-m-yy'
36
-            return new Date(parseInt(unix) * 1000).format(f)
35
+            const d = new Date(parseInt(unix) * 1000)
36
+            return includeTime ? d.toLocaleString('en-US') : d.toLocaleDateString('en-US')
37
         },
37
         },
38
         async getPosts() {
38
         async getPosts() {
39
             this.$store.commit('CLEAR_EVENTS')
39
             this.$store.commit('CLEAR_EVENTS')

+ 2
- 2
vue-theme/src/components/sidebars/exhibitions.vue Ver fichero

32
     },
32
     },
33
     methods: {
33
     methods: {
34
         dateFrom(unix, includeTime) {
34
         dateFrom(unix, includeTime) {
35
-            const f = includeTime ? 'dd-m-yy h:MM' : 'dd-m-yy'
36
-            return new Date(parseInt(unix) * 1000).format(f)
35
+            const d = new Date(parseInt(unix) * 1000)
36
+            return includeTime ? d.toLocaleString('en-US') : d.toLocaleDateString('en-US')
37
         },
37
         },
38
         async getPosts() {
38
         async getPosts() {
39
             this.$store.commit('CLEAR_EXHIBITIONS')
39
             this.$store.commit('CLEAR_EXHIBITIONS')

Loading…
Cancelar
Guardar