Forums

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

get create date of page with javascript

lareso
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!
August 20, 2022

Hi

This script convert today date to shamsi, now need to pass create date of page and it convert it to shamsi. any idea?

 

<!DOCTYPE html>

<html> <style>

body{ overflow-y: auto; padding-bottom: 50px;   padding-right: 50px; }

</style> <body> <script>


let today = new Date().toLocaleDateString('fa-IR');

document.write((today));

 

</script> </body> </html>

 

 

Thanks

1 answer

1 vote
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 20, 2022

Welcome to the Atlassian Community!

Why are you trying to do this by scraping pages when the REST API can do it all for you?

kohopir975
Contributor
October 2, 2022

@Nic Brough -Adaptavist- would you please tell me example?

I just need to convert  "create page date" to hijri shamsi and show on page.

 

any idea?

Thanks

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 2, 2022

Use the REST API to fetch the date, your code in your page can them format it any way you want to.

kohopir975
Contributor
October 2, 2022

@Nic Brough -Adaptavist- I'm newbie, would you please give me example?

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence administration, confluence admin training, confluence learning path, manage users and permissions, confluence certification, atlassian learning, cloud admin tools, streamline collaboration, confluence admin best practices

New Confluence Admin Learning Path! 🤩

Confidently manage users, permissions, and content in Confluence. This self-paced learning path helps admins streamline collaboration, improve user experience, and apply the best practices to get the most out of Confluence in any cloud environment.

Start Learning Now
AUG Leaders

Atlassian Community Events