Forums

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

When editing a page template is it possible to change the format the $date variable prints out as?

Charlie Deuter September 17, 2018

I am creating a page template, however when the `$date` variable is printed out it is always printed in `MMM dd, yyyy` format.

I would like the date to print out in `yyyy-MM-dd` format so that it can be sorted on (alphabetical sorting is only supported by the widget I am using)

Is there anyway to change the way the date is printed out short of changing the date format setting in General Configuration?

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 19, 2018

Hi Charlie,

I believe that the $date variable is using the date picker macro, which uses your locale when choosing the format:

Configuring the Time and Date Formats has no effect on this macro. We have a feature request (CONFSERVER-35168) requesting this ISO standard for sortability purposes.

Please vote on said feature request and comment there with your usage case as well.

Let me know if you have any questions about this.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events