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

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events