User:Ohconfucius/script/MOSNUM dates.js: Difference between revisions

Content deleted Content added
insert df parameter
Undid revision 1093757090 by Ohconfucius (talk)
Line 478:
//ISO dates within single citation
// ohc_regex(/(\|\s*(?:publication|archive|access|air|designation\d?_|)-?date\s*=\s*)@YYYY[-–]@MM[-–]@DD(?=\W\D)/gi, "$1@Day @Month @YYYY");
ohc_regex(/(\D|\W)@Month([ _]| |{{s*(?:breakpublication|nbsp)}}-?date\s*=\s*)@Day,((?:YYYY[ _-–]| |{{(?:break|nbsp)}})@YYYY|)MM[-–]@DD(?=[^|\]W\w]D)/gi, '"$1@Day$2 @Month$3' @YYYY");
}
 
Line 611:
//dates with embedded nbsp
ohc_regex(/(\D\W)@Month([ _]| )(\d{1,2},(?: | )\d{1,2}(?:\s(?:and|&|to|or)(?:[ _]| ))\d{1,2})(?=[^|\]\w])/gi, '$1$3$2@LMonth ');
ohc_regex(/(\D\W)@Month([ _]| |{{(?:break|nbsp)}})@Day,((?:[ _]| |{{(?:break|nbsp)}})@YYYY|)(?=[^|\]\w])/gi, '$1@Day$2@Month$3@Year');
 
//remove comma
Line 841:
regex(/([\|\{]\s*(?:season)\s*=)(\s*\[\[[^\]]*\]\]\s*)([|}])/gi, protect_function);
regex(/([\|\{]\s*(?:[xy])\s*=)(\s*[^\|]+\s*)(\|)/gi, protect_function);
regex(/(\{\{(?:sfn|navsource)\|)([^}]+)(\})/gi, protect_function);
regex(/(\{\{merge(?:[^}]+))([^}]+)(\})/gi, protect_function);
regex(/(\{\{(?:singlechart)\|)([^}]+)(\})/gi, protect_function);