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

Content deleted Content added
No edit summary
No edit summary
Line 484:
function ohc_dmy_publication_dates()
{
ohc_regex(/(\|[ ]*(?:date|archivedate|accessdate)[ ]*=[ ]*)@Month @Day,? @YYYY/gi, "$1@Day @Month @YYYY"); // conversion of dates in references outside of the protection loop (eg for quotations etc.)
ohc_regex(/(\|[ ]*(?:date|archivedate)[ ]*=[ ]*)(?:\[\[)?@YYYY(?:\]\][-–]\[\[|[-–])@MM[-–]@DD(?:\]\])?(?=\W\D)/gi, "$1@Day @Month @YYYY");
ohc_regex(/([ ]\()@YYYY-@MM-@DD(\)\W)/gi, '$1@Day @Month @YYYY$2');
Line 491 ⟶ 492:
function ohc_mdy_publication_dates()
{
ohc_regex(/(\|[ ]*(?:date|archivedate|accessdate)[ ]*=[ ]*)@Day @Month @YYYY/gi, "$1@Month @Day, @YYYY"); // conversion of dates in references outside of the protection loop (eg for quotations etc.)
ohc_regex(/(\|[ ]*(?:date|archivedate)[ ]*=[ ]*)(?:\[\[)?@YYYY(?:\]\][-–]\[\[|[-–])@MM[-–]@DD(?:\]\])?(?=\W\D)/gi, "$1@Month @Day, @YYYY");
ohc_regex(/([ ]\()@YYYY-@MM-@DD(\)\W)/gi, '$1@Month @Day, @YYYY$2');