forked from FoundKeyGang/FoundKey
Improve relative time detection (#3302)
This commit is contained in:
parent
e401ba9e25
commit
7fcbe87591
1 changed files with 2 additions and 2 deletions
|
@ -53,8 +53,8 @@ export default Vue.extend({
|
||||||
ago >= 3600 ? this.$t('@.time.hours_ago') .replace('{}', (~~(ago / 3600)).toString()) :
|
ago >= 3600 ? this.$t('@.time.hours_ago') .replace('{}', (~~(ago / 3600)).toString()) :
|
||||||
ago >= 60 ? this.$t('@.time.minutes_ago').replace('{}', (~~(ago / 60)).toString()) :
|
ago >= 60 ? this.$t('@.time.minutes_ago').replace('{}', (~~(ago / 60)).toString()) :
|
||||||
ago >= 10 ? this.$t('@.time.seconds_ago').replace('{}', (~~(ago % 60)).toString()) :
|
ago >= 10 ? this.$t('@.time.seconds_ago').replace('{}', (~~(ago % 60)).toString()) :
|
||||||
ago >= 0 ? this.$t('@.time.just_now') :
|
ago >= -1 ? this.$t('@.time.just_now') :
|
||||||
ago < 0 ? this.$t('@.time.future') :
|
ago < -1 ? this.$t('@.time.future') :
|
||||||
this.$t('@.time.unknown'));
|
this.$t('@.time.unknown'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue