MediaWiki:Gadget-morebits.js: Difference between revisions

Content deleted Content added
Repo at 62b9aab: Refactor MW timestamps to ISO 8601
Repo at 451b991: Fix A-z regex
Line 1,414:
args[0] = args[0].replace(/(\d\d:\d\d),/, '$1').replace(/\(UTC\)/, 'UTC');
// Safari is particular about timezone offsets, so this is intentionally specific
args[0] = args[0].replace(/(\d\d:\d\d) (\d{1,2}) ([A-zZ][a-z]+) (\d{4}) UTC$/, function(match, time, date, monthname, year) {
return [year, mw.config.get('wgMonthNames').indexOf(monthname), date].join('-') + 'T' + time + 'Z';
});