Browse Source

format time without seconds

tags/1.0.2
Alej 3 years ago
parent
commit
3dac923353
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      vue-theme/src/utils/helpers.js

+ 1
- 1
vue-theme/src/utils/helpers.js View File

75
 const formatDate = (unix, includeTime) => {
75
 const formatDate = (unix, includeTime) => {
76
     const d = new Date(parseInt(unix) * 1000)
76
     const d = new Date(parseInt(unix) * 1000)
77
     return includeTime
77
     return includeTime
78
-        ? d.toLocaleString('en-US', { timeZone: 'UTC' })
78
+        ? d.toLocaleString('en-US', { timeZone: 'UTC', dateStyle: 'short', timeStyle: 'short' })
79
         : d.toLocaleDateString('en-US', { timeZone: 'UTC' })
79
         : d.toLocaleDateString('en-US', { timeZone: 'UTC' })
80
 }
80
 }
81
 
81
 

Loading…
Cancel
Save