Skip to content

Commit

Permalink
fix js error
Browse files Browse the repository at this point in the history
  • Loading branch information
niltor committed Apr 2, 2024
1 parent aa1dbe8 commit a9750a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions WebApp/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,17 @@ function timeAgo(date) {

if (unit === '年') {
// show year and month
const month = Math.floor((seconds - counter * intervals[unit]) / intervals['月']);
let month = Math.floor((seconds - counter * intervals[unit]) / intervals['月']);
month = month > 0 ? month + '月' : '';
return `${counter}${unit}${month}前`;
}
if (unit === '月') {
const day = Math.floor((seconds - counter * intervals[unit]) / intervals['天']);
let day = Math.floor((seconds - counter * intervals[unit]) / intervals['天']);
day = day > 0 ? day + '天' : '';
return `${counter}${unit}${day}前`;
}
if (unit === '天') {
const hour = Math.floor((seconds - counter * intervals[unit]) / intervals['小时']);
lethour = Math.floor((seconds - counter * intervals[unit]) / intervals['小时']);
hour = hour > 0 ? hour + '小时' : '';
return `${counter}${unit}${hour}前`;
}
Expand Down
2 changes: 1 addition & 1 deletion webinfo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Name": "My Blog",
"Name": "EasyBlog",
"Description": "\uD83D\uDDFDto be a human",
"AuthorName": "NilTor",
"BaseHref": "/EasyBlog/"
Expand Down

0 comments on commit a9750a3

Please sign in to comment.