Getting time since timestamp

Hi all,

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

example

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: Moment.js | Docs . In Java, we’re not using anything, but it looks like GitHub - mfornos/humanize: Java facility for adding a “human touch” to data. does what you want.

Cheers,
Tobi