Content deleted Content added
Lightmouse (talk | contribs) No edit summary |
Lightmouse (talk | contribs) No edit summary |
||
Line 933:
txt.value=txt.value.replace(/([^\d][^\w\d])(Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\s([0123]?\d)(?:th|st|nd|rd|),?\s(\d{1,4})([^\w\d][^\d])/gi, '$1$3 $2 $4$5');
txt.value=txt.value.replace(/([^\d][^\w\d])(Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\s([0123]?\d)(?:th|st|nd|rd|)([^\w\d][^\d])/gi, '$1$3 $2$4');
//repeat previous two bits of code to capture some date ranges that were missed first time round
txt.value=txt.value.replace(/([^\d][^\w\d])(Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\s([0123]?\d)(?:th|st|nd|rd|),?\s(\d{1,4})([^\w\d][^\d])/gi, '$1$3 $2 $4$5');
txt.value=txt.value.replace(/([^\d][^\w\d])(Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\s([0123]?\d)(?:th|st|nd|rd|)([^\w\d][^\d])/gi, '$1$3 $2$4');
//Month+day_number "March 7th" -> "March 7"
Line 961 ⟶ 966:
txt.value=txt.value.replace(/([^\d][^\w\d])([0123]?\d)(?:th|st|nd|rd|)\s(Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\s(\d{1,4})([^\w\d][^\d])/gi, '$1$3 $2, $4$5');
txt.value=txt.value.replace(/([^\d][^\w\d])([0123]?\d)(?:th|st|nd|rd|)\s(Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)([^\w\d][^\d])/gi, '$1$3 $2$4');
//repeat previous two bits of code to capture some date ranges that were missed first time round
txt.value=txt.value.replace(/([^\d][^\w\d])([0123]?\d)(?:th|st|nd|rd|)\s(Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\s(\d{1,4})([^\w\d][^\d])/gi, '$1$3 $2, $4$5');
txt.value=txt.value.replace(/([^\d][^\w\d])([0123]?\d)(?:th|st|nd|rd|)\s(Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)([^\w\d][^\d])/gi, '$1$3 $2$4');
//Month+day_number "March 7th" -> "March 7"
|