Jump to content

Wikipedia talk:Date formattings/script/MOSNUM dates

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 1exec1 (talk | contribs) at 21:11, 3 June 2012 (some questions about old changes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Some questions about changes by Ohconfucius before 12 May

This changeset contains changes to Ohconfucius' test script that I didn't understand fully. Let's have some review and then incorporate them to the main script if everything is OK :)

1

Line 741:

- regex(/\[\[(AD|BC|CE|BCE)([\s_]?)(\d{1,4})\]\]/gi, '$3$2$1');
+ regex(/\[\[(AD|BC|CE|BCE)([\s_]?)(\d{1,4})\]\]/gi, '$1$2$3');

Why don't we reorder dates into consistent format like 123 AD after unlinking? 1exec1 (talk) 21:11, 3 June 2012 (UTC)[reply]

2

Line 762:

- ohc_regex(/\[\[@day[\s_](?:of[\s_])?@month\|([^\]]{1,30})\]\]/gi, "$1");
+ ohc_regex(/\[\[@day[\s_](?:st|nd|rd|th|)[\s_](?:of[\s_])?@month\|([^\]]{1,30})\]\]/gi, "$1");

Wouldn't @th? be sufficient instead of (?:st|nd|rd|th|)? 1exec1 (talk) 21:11, 3 June 2012 (UTC)[reply]

3

Line 762:

-    ohc_regex(/\[\[@Day\]\]/gi, "@Day");
+ // ohc_regex(/\[\[@Day\]\]/gi, "@Day");

Is there's something bad with unlinking days? 1exec1 (talk) 21:11, 3 June 2012 (UTC)[reply]

4

Line 875 and 881:

+  ohc_regex(/(\()@YYYY[-–]@MM[-–]@DD(\))/gi, '$1@Day @Month @YYYY$2');
...
+  ohc_regex(/(\()@YYYY[-–]@MM[-–]@DD(\))/gi, '$1@Month @Day, @YYYY$2');

What's the reason for these additions? Was it that multiple dates within the same citation weren't converted? If it is so, then this change isn't necessary, as I've added proper fix for this problem. 1exec1 (talk) 21:11, 3 June 2012 (UTC)[reply]

...

I'll add more later. 1exec1 (talk) 21:11, 3 June 2012 (UTC)[reply]