Getting time since timestamp

Hi all,

I’m trying to format my date to something like below:


How does JIRA calculate and format dates like the image above?
Is there a simple way to do this programatically? or would I have to calculate it?

I’ve discovered JiraDurationUtils but I’m not sure if this is what I’m looking for.
Any advice would be appreciated.

Hi @sanjit.kosi,

Not sure how Jira does it, but here’s how we do it:

In Javascript, I would recommend moment.js: . In Java, we’re not using anything, but it looks like does what you want.