The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Convert date from REST API to ' friendly date ' string?

PS
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 28, 2020

I'm doing a REST API request like this:


/rest/api/content/ID_ID_ID?expand=version history

and now I want to show the date available in version.when but in the 'friendly' string like '15 minutos ago'.

Is there any way to achieve this without an external plugin/logic? I mean, the REST api has any conversion tool from "2020-06-28T19:09:59.726Z" to "2 minutos ago" ?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Mehmet A _Bloompeak_
Atlassian Partner
June 28, 2020

Hi @PS ,

Unfortunately, rest api does not provide any way to do that conversion. You can parse the json and convert the dates by coding.

TAGS
AUG Leaders

Atlassian Community Events