瀏覽代碼

format time without seconds

tags/1.0.2
Alej 3 年之前
父節點
當前提交
3dac923353
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      vue-theme/src/utils/helpers.js

+ 1
- 1
vue-theme/src/utils/helpers.js 查看文件

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

Loading…
取消
儲存