User:Ohconfucius/test/MOSNUM dates code.js: Difference between revisions

Content deleted Content added
+Last accessed
tweak to 'eliminating dd-mm-yyyy dates'
Line 207:
ohc_regex(/(\|[ ]*(?:date|archivedate|accessdate)[ ]*=[ ]*)(?:\[\[)?@DD(?:\]\]-\[\[|-)@Mon-@YYYY(?:\]\])?/gi, "$1@Day @Month @YYYY");
ohc_regex(/[ ](?:Accessed|Retrieved)( on|:)[ ]@DD-@MM-@YYYY/gi, " Retrieved @Day @Month @YYYY");
 
ohc_regex(/([ =]+)@DD-@Mon-@YYYY((?:\d|1[0-9]|20)\d{2})(?![-–\d\/])/gi, "$1@Day @Month @YYYY$2"); //narrowing choice of years by not using @YYYY
ohc_regex(/([ =]+)@DD-@MM-@YYYY((?:\d|1[0-9]|20)\d{2})(?![-–\d\/])/gi, "$1@Day @Month @YYYY$2");
 
// eliminating other errant formats
Line 252 ⟶ 255:
ohc_regex(/(\|[ ]*(?:date|archivedate|accessdate)[ ]*=[ ]*@dd) (@month)/gi, '$1 $2');
ohc_regex(/(\|[ ]*(?:date|archivedate|accessdate)[ ]*=[ ]*)(@month) (@dd)(, @yyyy|)(?=[ ]*[\|\}])/gi, '$1$2 $3$4');
 
ohc_regex(/([ =]+)@DD-@Mon-@YYYY(?![-–\d\/])/gi, "$1@Day @Month @YYYY");
ohc_regex(/([ =]+)@DD-@MM-@YYYY(?![-–\d\/])/gi, "$1@Day @Month @YYYY");
 
//remove leading zero from 'Retrieved' date, replace 'accessed'