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

Content deleted Content added
access and archive dates
align to test script
Tag: Reverted
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\s*W)@Month([ _]| |{{(?:publicationbreak|nbsp)-?date\s*=\s*}})@YYYYDay,((?:[-– _]| |{{(?:break|nbsp)}})@MM[-–]@DDYYYY|)(?=[^|\W]\Dw])/gi, "'$1@Day $2@Month @YYYY"$3');
}
 
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);