Using various API client codes, I have implemented mediawiki-js to retrieve the last modified date of Wikipedia pages. While consulting the MediaWiki API documentation, I came across different timestamp formats but struggled to find the correct syntax to apply it. The provided code snippet:
var mwjs = new MediaWikiJS('https://en.wikipedia.org', { action: 'query', prop: 'revisions', titles: 'Main_Page' }, function (data) {
'use strict';
var pages = data.query.pages;
alert('Main page of Wikipedia last edited by: ' + pages[Object.keys(pages)[0]].revisions[0].timestamp);
});
displays the default format. How can I modify it to display a different required format?