MediaWiki:Gadget-morebits.js: Difference between revisions
Content deleted Content added
Amorymeltzer (talk | contribs) Repo at 451b991: Fix A-z regex |
Amorymeltzer (talk | contribs) Repo at bba08e9: zero-pad date in constructor |
||
Line 1,415:
// Safari is particular about timezone offsets, so this is intentionally specific
args[0] = args[0].replace(/(\d\d:\d\d) (\d{1,2}) ([A-Z][a-z]+) (\d{4}) UTC$/, function(match, time, date, monthname, year) {
// zero-pad date
if (date < 10) {
date = '0' + date;
}
return [year, mw.config.get('wgMonthNames').indexOf(monthname), date].join('-') + 'T' + time + 'Z';
});
|