diff options
author | martianh <martianh@noreply.codeberg.org> | 2022-11-28 15:14:10 +0000 |
---|---|---|
committer | martianh <martianh@noreply.codeberg.org> | 2022-11-28 15:14:10 +0000 |
commit | 0299c4f804e1e6810910d3eff531deeae0855264 (patch) | |
tree | 59452fa55c43b127d191b2f28efdbc79035ce562 /lisp/mastodon-tl.el | |
parent | 9656426c2ec596d3d97bed833a62ac2039a64e85 (diff) | |
parent | 2477cc3353de482231b60aea03a2d055588dfbed (diff) |
Merge pull request 'Modify relative time strings such as all string are <= 12 characters' (#337) from rougier/mastodon.el:timestamp into develop
Reviewed-on: https://codeberg.org/martianh/mastodon.el/pulls/337
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r-- | lisp/mastodon-tl.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 76cca6c..a8bccb9 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -570,25 +570,25 @@ TIMESTAMP is assumed to be in the past." (relative-result (cond ((< seconds-difference 60) - (cons "less than a minute ago" + (cons "just now" 60)) ((< seconds-difference (* 1.5 60)) - (cons "one minute ago" + (cons "1 minute ago" 90)) ;; at 90 secs ((< seconds-difference (* 60 59.5)) (funcall regular-response seconds-difference 60 "minute")) ((< seconds-difference (* 1.5 60 60)) - (cons "one hour ago" + (cons "1 hour ago" (* 60 90))) ;; at 90 minutes ((< seconds-difference (* 60 60 23.5)) (funcall regular-response seconds-difference (* 60 60) "hour")) ((< seconds-difference (* 1.5 60 60 24)) - (cons "one day ago" + (cons "1 day ago" (* 1.5 60 60 24))) ;; at a day and a half ((< seconds-difference (* 60 60 24 6.5)) (funcall regular-response seconds-difference (* 60 60 24) "day")) ((< seconds-difference (* 1.5 60 60 24 7)) - (cons "one week ago" + (cons "1 week ago" (* 1.5 60 60 24 7))) ;; a week and a half ((< seconds-difference (* 60 60 24 7 52)) (if (= 52 (floor (+ 0.5 (/ seconds-difference 60 60 24 7)))) @@ -596,7 +596,7 @@ TIMESTAMP is assumed to be in the past." (* 60 60 24 7 52)) (funcall regular-response seconds-difference (* 60 60 24 7) "week"))) ((< seconds-difference (* 1.5 60 60 24 365)) - (cons "one year ago" + (cons "1 year ago" (* 60 60 24 365 1.5))) ;; a year and a half (t (funcall regular-response seconds-difference (* 60 60 24 365.25) "year"))))) |