refactor:format code

This commit is contained in:
Pan
2017-11-17 14:57:39 +08:00
parent 6d6a9df5b8
commit 339d760771
17 changed files with 77 additions and 58 deletions

View File

@@ -4,6 +4,7 @@ function pluralize(time, label) {
}
return time + label + 's'
}
export function timeAgo(time) {
const between = Date.now() / 1000 - Number(time)
if (between < 3600) {