Been pulling my hair out on a ‘time passed since’ feature. Can’t seem to find anything on the forum - perhaps I’m missing something quite straight forward…
I’m building a forum and am looking to display the amount of time that has passed since a discussions’ latest activity.
How would I make this calculation? I’ve captured discussions’ ‘latest activity’ timestamp, but have no idea how to count the time from there until the present.
How do I display this ‘time passed’ based on the below conditions?
If < 60 m, in minutes
If >60 m and < 24 h, in hours
If > 24 h, in days
I’m looking to mimic what Bubble does in it’s forum:
Grateful for any thoughts that can point me in the right direction!