Commit 2f8988df by zhangxw

1

1 parent 560b3818
......@@ -54,7 +54,7 @@ export function commentTime(dateTimeStamp) {
let weektTime = dayTime * 7
let monthTime = dayTime * 30
let yearTime = dayTime * 365
if (timeDifference / yearTime > 1 && Math.floor(timeDifference / yearTime) >= 1) {
if (Math.floor(timeDifference / yearTime) >= 1) {
result = Math.floor(timeDifference / yearTime) + '年前'
} else if (Math.floor(timeDifference / monthTime) >= 1) {
result = Math.floor(timeDifference / monthTime) + '月前'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!