User:Bobblewik/monobook.js/dates.js: Difference between revisions

Content deleted Content added
Bobblewik (talk | contribs)
mNo edit summary
Bobblewik (talk | contribs)
m revert back several versions
Line 3:
 
// century
txt.value = txt.value.replace(/\[\[(\d{1,2}(?:st|nd|rd|th))[ -](century)\]\]/gi, '$1 century');
txt.value = txt.value.replace(/\[\[\d{1,2}(?:st|nd|rd|th)[ -]century\|(\d{1,2}(?:st|nd|rd|th))\]\]/gi, '$1');
txt.value = txt.value.replace(/\[\[\d{1,2}(?:st|nd|rd|th)[ -]century\|(\d{1,2}(?:st|nd|rd|th)[) -]century(centuries)\]\]/gi, '$1 centurycenturies');
txt.value = txt.value.replace(/\[\[\d{1,2}(?:st|nd|rd|th)[ -]century\|(\d{1,2}(?:st|nd|rd|th))[ -](centuries)\]\]/gi, '$1 centuries');
 
// decades
Line 27 ⟶ 26:
txt.value = txt.value.replace(/\[\[((?:January|February|March|April|May|June|July|August|September|October|November|December) \d{3,4})\]\]/gi, '$1');
 
// days of the week including optional plurals
txt.value = txt.value.replace(/\[\[(Mondays?Monday|Tuesdays?Tuesday|Wednesdays?Wednesday|Thursdays?Thursday|Fridays?Friday|Saturdays?Saturday|Sundays?Sunday)\]\]/gi, '$1');
txt.value = txt.value.replace(/\[\[(Mondays|Tuesdays|Wednesdays|Thursdays|Fridays|Saturdays|Sundays)\]\]/gi, '$1');
// days of the week but leave out 'Sun' as potentially valid link to the Sun
txt.value = txt.value.replace(/\[\[(Mon|Tue|Tues|Wed|Thu|Thur|Thurs|Fri|Sat|Sun)\]\]/gi, '$1');
txt.value = txt.value.replace(/\[\[Mondays?Monday\|(Mondays?)\]\]/gi, '$1');
txt.value = txt.value.replace(/\[\[Tuesdays?Tuesday\|(Tuesdays?)\]\]/gi, '$1');
txt.value = txt.value.replace(/\[\[Wednesdays?Wednesday\|(Wednesdays?)\]\]/gi, '$1');
txt.value = txt.value.replace(/\[\[Thursdays?Thursday\|(Thursdays?)\]\]/gi, '$1');
txt.value = txt.value.replace(/\[\[Fridays?Friday\|(Fridays?)\]\]/gi, '$1');
txt.value = txt.value.replace(/\[\[Saturdays?Saturday\|(Saturdays?)\]\]/gi, '$1');
txt.value = txt.value.replace(/\[\[Sundays?Sunday\|(Sundays?)\]\]/gi, '$1');
 
// ranked days