User:Date delinker/ambiguousdates.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
function ambiguous_dates(){
var txt=document.editform.wpTextbox1;
// resolvable ambiguous date formats
//4-digit year universal
txt.value=txt.value.replace(/([^\d])\s0?1\/0?1\/(\d{4})(?![\w\d-])/g, '$1 1 January $2');
txt.value=txt.value.replace(/([^\d])\s0?2\/0?2\/(\d{4})(?![\w\d-])/g, '$1 2 February $2');
txt.value=txt.value.replace(/([^\d])\s0?3\/0?3\/(\d{4})(?![\w\d-])/g, '$1 3 March $2');
txt.value=txt.value.replace(/([^\d])\s0?4\/0?4\/(\d{4})(?![\w\d-])/g, '$1 4 April $2');
txt.value=txt.value.replace(/([^\d])\s0?5\/0?5\/(\d{4})(?![\w\d-])/g, '$1 5 May $2');
txt.value=txt.value.replace(/([^\d])\s0?6\/0?6\/(\d{4})(?![\w\d-])/g, '$1 6 June $2');
txt.value=txt.value.replace(/([^\d])\s0?7\/0?7\/(\d{4})(?![\w\d-])/g, '$1 7 July $2');
txt.value=txt.value.replace(/([^\d])\s0?8\/0?8\/(\d{4})(?![\w\d-])/g, '$1 8 August $2');
txt.value=txt.value.replace(/([^\d])\s0?9\/0?9\/(\d{4})(?![\w\d-])/g, '$1 9 September $2');
txt.value=txt.value.replace(/([^\d])\s10\/10\/(\d{4})(?![\w\d-])/g, '$1 10 October $2');
txt.value=txt.value.replace(/([^\d])\s11\/11\/(\d{4})(?![\w\d-])/g, '$1 11 November $2');
txt.value=txt.value.replace(/([^\d])\s12\/12\/(\d{4})(?![\w\d-])/g, '$1 12 December $2');
//4-digit year UK style
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?1\/(\d{4})(?![\w\d-])/g, '$1 January $2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?2\/(\d{4})(?![\w\d-])/g, '$1 February $2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?3\/(\d{4})(?![\w\d-])/g, '$1 March $2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?4\/(\d{4})(?![\w\d-])/g, '$1 April $2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?5\/(\d{4})(?![\w\d-])/g, '$1 May $2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?6\/(\d{4})(?![\w\d-])/g, '$1 June $2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?7\/(\d{4})(?![\w\d-])/g, '$1 July $2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?8\/(\d{4})(?![\w\d-])/g, '$1 August $2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?9\/(\d{4})(?![\w\d-])/g, '$1 September $2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/10\/(\d{4})(?![\w\d-])/g, '$1 October $2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/11\/(\d{4})(?![\w\d-])/g, '$1 November $2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/12\/(\d{4})(?![\w\d-])/g, '$1 December $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?1\/(\d{4})(?![\w\d-])/g, '$1 January $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?2\/(\d{4})(?![\w\d-])/g, '$1 February $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?3\/(\d{4})(?![\w\d-])/g, '$1 March $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?4\/(\d{4})(?![\w\d-])/g, '$1 April $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?5\/(\d{4})(?![\w\d-])/g, '$1 May $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?6\/(\d{4})(?![\w\d-])/g, '$1 June $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?7\/(\d{4})(?![\w\d-])/g, '$1 July $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?8\/(\d{4})(?![\w\d-])/g, '$1 August $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?9\/(\d{4})(?![\w\d-])/g, '$1 September $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/10\/(\d{4})(?![\w\d-])/g, '$1 October $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/11\/(\d{4})(?![\w\d-])/g, '$1 November $2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/12\/(\d{4})(?![\w\d-])/g, '$1 December $2');
//4-digit year US style
txt.value=txt.value.replace(/([^\w\d-])0?1\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 January $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?2\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 February $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?3\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 March $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?4\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 April $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?5\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 May $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?6\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 June $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?7\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 July $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?8\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 August $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?9\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 September $2, $3');
txt.value=txt.value.replace(/([^\w\d-])10\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 October $2, $3');
txt.value=txt.value.replace(/([^\w\d-])11\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 November $2, $3');
txt.value=txt.value.replace(/([^\w\d-])12\/([23]\d)\/(\d{4})(?![\w\d-])/g, '$1 December $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?1\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 January $2,\'$3');
txt.value=txt.value.replace(/([^\w\d-])0?2\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 February $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?3\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 March $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?4\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 April $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?5\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 May $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?6\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 June $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?7\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 July $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?8\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 August $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?9\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 September $2, $3');
txt.value=txt.value.replace(/([^\w\d-])10\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 October $2, $3');
txt.value=txt.value.replace(/([^\w\d-])11\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 November $2, $3');
txt.value=txt.value.replace(/([^\w\d-])12\/(1[3-9])\/(\d{4})(?![\w\d-])/g, '$1 December $2, $3');
//2-digit year ('00-'19) universal
txt.value=txt.value.replace(/([^\d])\s0?1\/0?1\/([01]\d)(?![\w\d-])/g, '$1 1 January 20$2');
txt.value=txt.value.replace(/([^\d])\s0?2\/0?2\/([01]\d)(?![\w\d-])/g, '$1 2 February 20$2');
txt.value=txt.value.replace(/([^\d])\s0?3\/0?3\/([01]\d)(?![\w\d-])/g, '$1 3 March 20$2');
txt.value=txt.value.replace(/([^\d])\s0?4\/0?4\/([01]\d)(?![\w\d-])/g, '$1 4 April 20$2');
txt.value=txt.value.replace(/([^\d])\s0?5\/0?5\/([01]\d)(?![\w\d-])/g, '$1 5 May 20$2');
txt.value=txt.value.replace(/([^\d])\s0?6\/0?6\/([01]\d)(?![\w\d-])/g, '$1 6 June 20$2');
txt.value=txt.value.replace(/([^\d])\s0?7\/0?7\/([01]\d)(?![\w\d-])/g, '$1 7 July 20$2');
txt.value=txt.value.replace(/([^\d])\s0?8\/0?8\/([01]\d)(?![\w\d-])/g, '$1 8 August 20$2');
txt.value=txt.value.replace(/([^\d])\s0?9\/0?9\/([01]\d)(?![\w\d-])/g, '$1 9 September 20$2');
txt.value=txt.value.replace(/([^\d])\s10\/10\/([01]\d)(?![\w\d-])/g, '$1 10 October 20$2');
txt.value=txt.value.replace(/([^\d])\s11\/11\/([01]\d)(?![\w\d-])/g, '$1 11 November 20$2');
txt.value=txt.value.replace(/([^\d])\s12\/12\/([01]\d)(?![\w\d-])/g, '$1 12 December 20$2');
//2-digit year ('00-'19) UK style
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?1\/([01]\d)(?![\w\d-])/g, '$1 January 20$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?2\/([01]\d)(?![\w\d-])/g, '$1 February 20$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?3\/([01]\d)(?![\w\d-])/g, '$1 March 20$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?4\/([01]\d)(?![\w\d-])/g, '$1 April 20$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?5\/([01]\d)(?![\w\d-])/g, '$1 May 20$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?6\/([01]\d)(?![\w\d-])/g, '$1 June 20$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?7\/([01]\d)(?![\w\d-])/g, '$1 July 20$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?8\/([01]\d)(?![\w\d-])/g, '$1 August 20$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?9\/([01]\d)(?![\w\d-])/g, '$1 September 20$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/10\/([01]\d)(?![\w\d-])/g, '$1 October 20$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/11\/([01]\d)(?![\w\d-])/g, '$1 November 20$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/12\/([01]\d)(?![\w\d-])/g, '$1 December 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?1\/([01]\d)(?![\w\d-])/g, '$1 January 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?2\/([01]\d)(?![\w\d-])/g, '$1 February 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?3\/([01]\d)(?![\w\d-])/g, '$1 March 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?4\/([01]\d)(?![\w\d-])/g, '$1 April 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?5\/([01]\d)(?![\w\d-])/g, '$1 May 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?6\/([01]\d)(?![\w\d-])/g, '$1 June 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?7\/([01]\d)(?![\w\d-])/g, '$1 July 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?8\/([01]\d)(?![\w\d-])/g, '$1 August 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?9\/([01]\d)(?![\w\d-])/g, '$1 September 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/10\/([01]\d)(?![\w\d-])/g, '$1 October 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/11\/([01]\d)(?![\w\d-])/g, '$1 November 20$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/12\/([01]\d)(?![\w\d-])/g, '$1 December 20$2');
//2-digit year ('00-'19) US style
txt.value=txt.value.replace(/([^\w\d-])0?1\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 January $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?2\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 February $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?3\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 March $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?4\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 April $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?5\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 May $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?6\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 June $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?7\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 July $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?8\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 August $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?9\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 September $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])10\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 October $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])11\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 November $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])12\/([23]\d)\/([01]\d)(?![\w\d-])/g, '$1 December $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?1\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 January $2,20$3');
txt.value=txt.value.replace(/([^\w\d-])0?2\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 February $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?3\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 March $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?4\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 April $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?5\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 May $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?6\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 June $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?7\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 July $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?8\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 August $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?9\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 September $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])10\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 October $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])11\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 November $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])12\/(1[3-9])\/([01]\d)(?![\w\d-])/g, '$1 December $2, 20$3');
//2-digit year ('60-'99) universal
txt.value=txt.value.replace(/([^\d])\s0?1\/0?1\/([6-9]\d)(?![\w\d-])/g, '$1 1 January 19$2');
txt.value=txt.value.replace(/([^\d])\s0?2\/0?2\/([6-9]\d)(?![\w\d-])/g, '$1 2 February 19$2');
txt.value=txt.value.replace(/([^\d])\s0?3\/0?3\/([6-9]\d)(?![\w\d-])/g, '$1 3 March 19$2');
txt.value=txt.value.replace(/([^\d])\s0?4\/0?4\/([6-9]\d)(?![\w\d-])/g, '$1 4 April 19$2');
txt.value=txt.value.replace(/([^\d])\s0?5\/0?5\/([6-9]\d)(?![\w\d-])/g, '$1 5 May 19$2');
txt.value=txt.value.replace(/([^\d])\s0?6\/0?6\/([6-9]\d)(?![\w\d-])/g, '$1 6 June 19$2');
txt.value=txt.value.replace(/([^\d])\s0?7\/0?7\/([6-9]\d)(?![\w\d-])/g, '$1 7 July 19$2');
txt.value=txt.value.replace(/([^\d])\s0?8\/0?8\/([6-9]\d)(?![\w\d-])/g, '$1 8 August 19$2');
txt.value=txt.value.replace(/([^\d])\s0?9\/0?9\/([6-9]\d)(?![\w\d-])/g, '$1 9 September 19$2');
txt.value=txt.value.replace(/([^\d])\s10\/10\/([6-9]\d)(?![\w\d-])/g, '$1 10 October 19$2');
txt.value=txt.value.replace(/([^\d])\s11\/11\/([6-9]\d)(?![\w\d-])/g, '$1 11 November 19$2');
txt.value=txt.value.replace(/([^\d])\s12\/12\/([6-9]\d)(?![\w\d-])/g, '$1 12 December 19$2');
//2-digit year ('60-'99) UK style
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?1\/([6-9]\d)(?![\w\d-])/g, '$1 January 19$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?2\/([6-9]\d)(?![\w\d-])/g, '$1 February 19$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?3\/([6-9]\d)(?![\w\d-])/g, '$1 March 19$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?4\/([6-9]\d)(?![\w\d-])/g, '$1 April 19$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?5\/([6-9]\d)(?![\w\d-])/g, '$1 May 19$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?6\/([6-9]\d)(?![\w\d-])/g, '$1 June 19$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?7\/([6-9]\d)(?![\w\d-])/g, '$1 July 19$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?8\/([6-9]\d)(?![\w\d-])/g, '$1 August 19$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?9\/([6-9]\d)(?![\w\d-])/g, '$1 September 19$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/10\/([6-9]\d)(?![\w\d-])/g, '$1 October 19$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/11\/([6-9]\d)(?![\w\d-])/g, '$1 November 19$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/12\/([6-9]\d)(?![\w\d-])/g, '$1 December 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?1\/([6-9]\d)(?![\w\d-])/g, '$1 January 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?2\/([6-9]\d)(?![\w\d-])/g, '$1 February 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?3\/([6-9]\d)(?![\w\d-])/g, '$1 March 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?4\/([6-9]\d)(?![\w\d-])/g, '$1 April 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?5\/([6-9]\d)(?![\w\d-])/g, '$1 May 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?6\/([6-9]\d)(?![\w\d-])/g, '$1 June 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?7\/([6-9]\d)(?![\w\d-])/g, '$1 July 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?8\/([6-9]\d)(?![\w\d-])/g, '$1 August 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?9\/([6-9]\d)(?![\w\d-])/g, '$1 September 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/10\/([6-9]\d)(?![\w\d-])/g, '$1 October 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/11\/([6-9]\d)(?![\w\d-])/g, '$1 November 19$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/12\/([6-9]\d)(?![\w\d-])/g, '$1 December 19$2');
//2-digit year ('60-'99) US style
txt.value=txt.value.replace(/([^\w\d-])0?1\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 January $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?2\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 February $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?3\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 March $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?4\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 April $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?5\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 May $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?6\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 June $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?7\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 July $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?8\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 August $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?9\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 September $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])10\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 October $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])11\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 November $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])12\/([23]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 December $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?1\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 January $2,19$3');
txt.value=txt.value.replace(/([^\w\d-])0?2\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 February $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?3\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 March $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?4\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 April $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?5\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 May $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?6\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 June $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?7\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 July $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?8\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 August $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?9\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 September $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])10\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 October $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])11\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 November $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])12\/(1[3-9])\/([6-9]\d)(?![\w\d-])/g, '$1 December $2, 19$3');
//universal
txt.value=txt.value.replace(/([^\d])\s0?1\/0?1\/(\d{2,4})(?![\w\d-])/g, '$1 1 January \'$2');
txt.value=txt.value.replace(/([^\d])\s0?2\/0?2\/(\d{2,4})(?![\w\d-])/g, '$1 2 February \'$2');
txt.value=txt.value.replace(/([^\d])\s0?3\/0?3\/(\d{2,4})(?![\w\d-])/g, '$1 3 March \'$2');
txt.value=txt.value.replace(/([^\d])\s0?4\/0?4\/(\d{2,4})(?![\w\d-])/g, '$1 4 April \'$2');
txt.value=txt.value.replace(/([^\d])\s0?5\/0?5\/(\d{2,4})(?![\w\d-])/g, '$1 5 May \'$2');
txt.value=txt.value.replace(/([^\d])\s0?6\/0?6\/(\d{2,4})(?![\w\d-])/g, '$1 6 June \'$2');
txt.value=txt.value.replace(/([^\d])\s0?7\/0?7\/(\d{2,4})(?![\w\d-])/g, '$1 7 July \'$2');
txt.value=txt.value.replace(/([^\d])\s0?8\/0?8\/(\d{2,4})(?![\w\d-])/g, '$1 8 August \'$2');
txt.value=txt.value.replace(/([^\d])\s0?9\/0?9\/(\d{2,4})(?![\w\d-])/g, '$1 9 September \'$2');
txt.value=txt.value.replace(/([^\d])\s10\/10\/(\d{2,4})(?![\w\d-])/g, '$1 10 October \'$2');
txt.value=txt.value.replace(/([^\d])\s11\/11\/(\d{2,4})(?![\w\d-])/g, '$1 11 November \'$2');
txt.value=txt.value.replace(/([^\d])\s12\/12\/(\d{2,4})(?![\w\d-])/g, '$1 12 December \'$2');
//UK style
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?1\/(\d{2,4})(?![\w\d-])/g, '$1 January \'$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?2\/(\d{2,4})(?![\w\d-])/g, '$1 February \'$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?3\/(\d{2,4})(?![\w\d-])/g, '$1 March \'$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?4\/(\d{2,4})(?![\w\d-])/g, '$1 April \'$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?5\/(\d{2,4})(?![\w\d-])/g, '$1 May \'$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?6\/(\d{2,4})(?![\w\d-])/g, '$1 June \'$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?7\/(\d{2,4})(?![\w\d-])/g, '$1 July \'$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?8\/(\d{2,4})(?![\w\d-])/g, '$1 August \'$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/0?9\/(\d{2,4})(?![\w\d-])/g, '$1 September \'$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/10\/(\d{2,4})(?![\w\d-])/g, '$1 October \'$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/11\/(\d{2,4})(?![\w\d-])/g, '$1 November \'$2');
txt.value=txt.value.replace(/([^\w\d-][23]\d)\/12\/(\d{2,4})(?![\w\d-])/g, '$1 December \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?1\/(\d{2,4})(?![\w\d-])/g, '$1 January \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?2\/(\d{2,4})(?![\w\d-])/g, '$1 February \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?3\/(\d{2,4})(?![\w\d-])/g, '$1 March \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?4\/(\d{2,4})(?![\w\d-])/g, '$1 April \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?5\/(\d{2,4})(?![\w\d-])/g, '$1 May \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?6\/(\d{2,4})(?![\w\d-])/g, '$1 June \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?7\/(\d{2,4})(?![\w\d-])/g, '$1 July \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?8\/(\d{2,4})(?![\w\d-])/g, '$1 August \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/0?9\/(\d{2,4})(?![\w\d-])/g, '$1 September \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/10\/(\d{2,4})(?![\w\d-])/g, '$1 October \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/11\/(\d{2,4})(?![\w\d-])/g, '$1 November \'$2');
txt.value=txt.value.replace(/([^\w\d-]1[3-9])\/12\/(\d{2,4})(?![\w\d-])/g, '$1 December \'$2');
//US style
txt.value=txt.value.replace(/([^\w\d-])0?1\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 January $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?2\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 February $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?3\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 March $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?4\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 April $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?5\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 May $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?6\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 June $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?7\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 July $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?8\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 August $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?9\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 September $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])10\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 October $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])11\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 November $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])12\/([23]\d)\/(\d{2,4})(?![\w\d-])/g, '$1 December $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?1\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 January $2,\'$3');
txt.value=txt.value.replace(/([^\w\d-])0?2\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 February $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?3\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 March $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?4\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 April $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?5\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 May $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?6\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 June $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?7\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 July $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?8\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 August $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])0?9\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 September $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])10\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 October $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])11\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 November $2, \'$3');
txt.value=txt.value.replace(/([^\w\d-])12\/(1[3-9])\/(\d{2,4})(?![\w\d-])/g, '$1 December $2, \'$3');
// Add a tag to the summary box
var txt=document.editform.wpSummary;
var summary = "resolved [[WP:MOSNUM|ambiguous date formats]]";
if (txt.value.indexOf(summary) == -1) {
if (txt.value.match(/[^\*\/\s][^\/\s]?\s*$/)) {
txt.value += " | ";
}
txt.value += summary;
}
document.forms.editform.wpMinoredit.checked = true;
// document.editform.wpDiff.click();
}
//////
function Ohc_US_slash_dates(){
var txt=document.editform.wpTextbox1;
// resolvable ambiguous date formats
//4-digit year US style
txt.value=txt.value.replace(/([^\w\d-])0?1\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 January $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?2\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 February $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?3\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 March $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?4\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 April $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?5\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 May $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?6\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 June $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?7\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 July $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?8\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 August $2, $3');
txt.value=txt.value.replace(/([^\w\d-])0?9\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 September $2, $3');
txt.value=txt.value.replace(/([^\w\d-])10\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 October $2, $3');
txt.value=txt.value.replace(/([^\w\d-])11\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 November $2, $3');
txt.value=txt.value.replace(/([^\w\d-])12\/([0-3]\d)\/(\d{4})(?![\w\d-])/g, '$1 December $2, $3');
//2-digit year ('00-'19) US style
txt.value=txt.value.replace(/([^\w\d-])0?1\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 January $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?2\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 February $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?3\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 March $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?4\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 April $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?5\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 May $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?6\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 June $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?7\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 July $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?8\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 August $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])0?9\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 September $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])10\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 October $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])11\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 November $2, 20$3');
txt.value=txt.value.replace(/([^\w\d-])12\/([0-3]\d)\/([01]\d)(?![\w\d-])/g, '$1 December $2, 20$3');
//2-digit year ('60-'99) US style
txt.value=txt.value.replace(/([^\w\d-])0?1\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 January $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?2\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 February $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?3\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 March $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?4\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 April $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?5\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 May $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?6\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 June $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?7\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 July $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?8\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 August $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])0?9\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 September $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])10\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 October $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])11\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 November $2, 19$3');
txt.value=txt.value.replace(/([^\w\d-])12\/([0-3]\d)\/([6-9]\d)(?![\w\d-])/g, '$1 December $2, 19$3');
// Add a tag to the summary box
var txt=document.editform.wpSummary;
var summary = "resolved [[WP:MOSNUM|ambiguous date formats]]";
if (txt.value.indexOf(summary) == -1) {
if (txt.value.match(/[^\*\/\s][^\/\s]?\s*$/)) {
txt.value += " | ";
}
txt.value += summary;
}
document.forms.editform.wpMinoredit.checked = true;
// document.editform.wpDiff.click();
}
function Ohc_UK_slash_dates(){
var txt=document.editform.wpTextbox1;
// resolvable ambiguous date formats
//4-digit year UK style
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?1\/(\d{4})(?![\w\d-])/g, '$1 January $2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?2\/(\d{4})(?![\w\d-])/g, '$1 February $2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?3\/(\d{4})(?![\w\d-])/g, '$1 March $2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?4\/(\d{4})(?![\w\d-])/g, '$1 April $2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?5\/(\d{4})(?![\w\d-])/g, '$1 May $2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?6\/(\d{4})(?![\w\d-])/g, '$1 June $2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?7\/(\d{4})(?![\w\d-])/g, '$1 July $2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?8\/(\d{4})(?![\w\d-])/g, '$1 August $2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?9\/(\d{4})(?![\w\d-])/g, '$1 September $2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/10\/(\d{4})(?![\w\d-])/g, '$1 October $2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/11\/(\d{4})(?![\w\d-])/g, '$1 November $2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/12\/(\d{4})(?![\w\d-])/g, '$1 December $2');
//2-digit year ('00-'19) UK style
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?1\/([01]\d)(?![\w\d-])/g, '$1 January 20$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?2\/([01]\d)(?![\w\d-])/g, '$1 February 20$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?3\/([01]\d)(?![\w\d-])/g, '$1 March 20$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?4\/([01]\d)(?![\w\d-])/g, '$1 April 20$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?5\/([01]\d)(?![\w\d-])/g, '$1 May 20$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?6\/([01]\d)(?![\w\d-])/g, '$1 June 20$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?7\/([01]\d)(?![\w\d-])/g, '$1 July 20$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?8\/([01]\d)(?![\w\d-])/g, '$1 August 20$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?9\/([01]\d)(?![\w\d-])/g, '$1 September 20$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/10\/([01]\d)(?![\w\d-])/g, '$1 October 20$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/11\/([01]\d)(?![\w\d-])/g, '$1 November 20$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/12\/([01]\d)(?![\w\d-])/g, '$1 December 20$2');
//2-digit year ('60-'99) UK style
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?1\/([6-9]\d)(?![\w\d-])/g, '$1 January 19$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?2\/([6-9]\d)(?![\w\d-])/g, '$1 February 19$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?3\/([6-9]\d)(?![\w\d-])/g, '$1 March 19$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?4\/([6-9]\d)(?![\w\d-])/g, '$1 April 19$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?5\/([6-9]\d)(?![\w\d-])/g, '$1 May 19$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?6\/([6-9]\d)(?![\w\d-])/g, '$1 June 19$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?7\/([6-9]\d)(?![\w\d-])/g, '$1 July 19$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?8\/([6-9]\d)(?![\w\d-])/g, '$1 August 19$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/0?9\/([6-9]\d)(?![\w\d-])/g, '$1 September 19$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/10\/([6-9]\d)(?![\w\d-])/g, '$1 October 19$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/11\/([6-9]\d)(?![\w\d-])/g, '$1 November 19$2');
txt.value=txt.value.replace(/([^\w\d-][0-3]\d)\/12\/([6-9]\d)(?![\w\d-])/g, '$1 December 19$2');
// Add a tag to the summary box
var txt=document.editform.wpSummary;
var summary = "resolved [[WP:MOSNUM|ambiguous date formats]]";
if (txt.value.indexOf(summary) == -1) {
if (txt.value.match(/[^\*\/\s][^\/\s]?\s*$/)) {
txt.value += " | ";
}
txt.value += summary;
}
document.forms.editform.wpMinoredit.checked = true;
// document.editform.wpDiff.click();
}
$(function () {
if(document.forms.editform) {
mw.util.addPortletLink('p-tb', 'javascript:ambiguous_dates()', 'ambiguous dates', 't-slash', 'resolves slash date format', '', '');
mw.util.addPortletLink('p-tb', 'javascript:Ohc_US_slash_dates()', 'US-slash dates', 't-US', 'US-slash', '', '');
mw.util.addPortletLink('p-tb', 'javascript:Ohc_UK_slash_dates()', 'UK-slash dates', 't-UK', 'UK-slash', '', '');
}
});