From 7fcbe87591d5bc647a6f9ea99225b7691dfff770 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sat, 17 Nov 2018 20:57:23 +0900 Subject: [PATCH] Improve relative time detection (#3302) --- src/client/app/common/views/components/time.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/app/common/views/components/time.vue b/src/client/app/common/views/components/time.vue index 994f593f95..84f701469e 100644 --- a/src/client/app/common/views/components/time.vue +++ b/src/client/app/common/views/components/time.vue @@ -53,8 +53,8 @@ export default Vue.extend({ ago >= 3600 ? this.$t('@.time.hours_ago') .replace('{}', (~~(ago / 3600)).toString()) : ago >= 60 ? this.$t('@.time.minutes_ago').replace('{}', (~~(ago / 60)).toString()) : ago >= 10 ? this.$t('@.time.seconds_ago').replace('{}', (~~(ago % 60)).toString()) : - ago >= 0 ? this.$t('@.time.just_now') : - ago < 0 ? this.$t('@.time.future') : + ago >= -1 ? this.$t('@.time.just_now') : + ago < -1 ? this.$t('@.time.future') : this.$t('@.time.unknown')); } },