File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
crates/web/src/components/feed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,18 @@ pub fn Post(post: PostsPostsEdgesNode) -> impl IntoView {
15
15
. num_seconds ( ) ;
16
16
17
17
let format_string = match diff_in_seconds {
18
+ // More than 3 days
18
19
_ if diff_in_seconds > 86400 * LONG_TO_SHORT_CUTOFF_DAYS => "%m/%d/%y" . to_string ( ) , // More than 3 days
19
20
diff_in_seconds if diff_in_seconds > 86400 => {
20
21
format ! ( "{} Days ago" , diff_in_seconds / 86400 )
21
- } // Within 3 days
22
+ }
23
+ // Within 3 days
22
24
diff_in_seconds if diff_in_seconds > 3600 => {
23
25
format ! ( "{} hours ago" , diff_in_seconds / 3600 )
24
- } // Within 1 day
26
+ } // Within 1 hour
25
27
diff_in_seconds if diff_in_seconds > 60 => {
26
28
format ! ( "{} minutes ago" , diff_in_seconds / 60 )
27
- } // Within 1 hour
29
+ } // Within 1 minute
28
30
_ => format ! ( "{} seconds ago" , diff_in_seconds) ,
29
31
} ;
30
32
You can’t perform that action at this time.
0 commit comments