Xporter - a mistake on Confluence "Javascript" page Edited

Good day everyone!

Found out that the https://confluence.xpand-addons.com/display/public/XPORTER/Javascript :

%{var months =  new Array( 'Jan' ,  'Feb' ,  'Mar' ,  'Apr' ,  'May' ,  'Jun' ,  'Jul' ,  'Aug' ,  'Sep' ,  'Oct' ,  'Nov' ,  'Dec' ); var dateParts
 = '${dateformat("d-MMM-yyyy HH:mm:ss}'.split( '-' ); var month = dateParts[ 1 ]; var year = dateParts[ 0 ] ; var day = dateParts[ 2 ].split( ' ' )[ 0 ];
 months[Number(month) -  1 ] +  ' ' + day +  ', ' + year;}

doesn't work on the Word templates. Can anyone help to create the correct Javascript for this case? Unfortunately I can't use the standart date-format (MMM) because I need the Rus names of months using the English JIRA version 

Thanks in advance! 

1 answer

1 accepted

This widget could not be displayed.

ok, the solution was found:

%{var months = new Array('января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'); var dateParts = '${CreatedTime}'.split('-'); var month = dateParts[1]; var day = dateParts[0] ; var year = dateParts[2].split(' ')[0]; '«' + day + '» ' +  months[parseInt(month) - 1]  + ' ' + year + ' г.';}

it would be great to correct the mistake in the documentation.

Have a nice day!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

531 views 3 19
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you