Template talk:OldStyleDate

Conforming to user preferences
This template should be set to conform with the users Date format preference. For instance Boris Galerkins life with my preferences, now reads

(March 4 [O.S. February 20] 1871 - 1945-07-12)


 * Set per your request.--Jusjih 10:38, 13 October 2006 (UTC)

The template's output reads shity when the dates are in different years. E.g.  January 10 1906  becomes January 10 1906 rather than January 10 1906 [O.S. December 28, 1905] . There should be an optional fourth paramater to handle the second year properly. --FordPrefect42 21:57, 31 January 2007 (UTC)
 * Oops, I just realized there is Template:OldStyleDateDY for exactly that needs. How about some operating guidelines for these templates somewhere, folks? --FordPrefect42 22:09, 31 January 2007 (UTC)

New template
I've created Template:OldStyleDateNY, for dates without year. --Soman 13:57, 2 August 2007 (UTC)

Fontsize change
I'm going to update this ancient template to reflect contemporary font guidelines stipulating that prose text should remain consistent in size and format, bearing in mind that this template transcludes as regular text inside prose segments.  S n o w  talk 15:11, 18 January 2015 (UTC)

Discussion notice
See Template talk:OldStyleDateDY for a discussion about a proposed cosmetic change to the output from this template as well as two others. &#8213; Mandruss  &#9742;  07:50, 4 May 2016 (UTC)

Proposal to change the target of this template
This template (and its variants) currently points to Old Style and New Style dates. Following extensive and long-running discussion at talk:Old Style and New Style dates, much of which revolved around the issue of duplication/forking of content with Adoption of the Gregorian calendar, the former article has been revised extensively so that it addressed specifically (and only) the adoption of the Gregorian calendar in Great Britain and its colonies, as it is here where the terms O.S. and N.S. are most used. However, other jurisdictions also changed to the Gregorian calendar and the term 'old style' is used there too (both within en.wiki and in English-language resources externally). In respect of readers coming to Wikipedia to clarify what is meant by a reference to 'old style' in an external medium, there is a hat-note in Old Style and New Style dates that directs readers to the Adoption article. For the internal references (which are particularly prevalent in articles about Russia and Russians), a change is needed. So I would like to make the following proposal:
 * that, when the template generates a wlink to 'O.S.', the target becomes Adoption of the Gregorian calendar rather than this article.
 * Thus the template would become:  &#91;O.S. &#93; 
 * (instead of &#91;O.S. &#93; ).

The effect will be not be evident in the articles that use the template, they will look exactly the same. The only people that will be aware of the change will be those who wonder what the O.S. means and click on it. If this proposal achieves consensus, the 'sister' templates will be changed equivalently. Comments? --John Maynard Friedman (talk) 00:07, 1 December 2016 (UTC)
 * As there have been no comments, I have changed these templates. However, given further discussion at talk:Old Style and New Style dates, some additional material will be added to address the use of OS/NS notation in modern English language texts that deal with dates of events in Russia around the time of the revolution. --John Maynard Friedman (talk) 11:38, 9 December 2016 (UTC)
 * I have revered the change. I do not agree with changing a link to an article about new and old style dating to an article about a calendar particularly when. If you insist on educing the article Old Style and New Style dates so that its meaning is not comprehensive enough for this redirect then expand the article not redirect this to something that does not even mean old style date but instead means one of two possible new style dates. -- PBS (talk) 18:50, 31 December 2016 (UTC)
 * I'm inclined to agree. Old Style and New Style dates does a far better job explaining the difference in dates. Ibadibam (talk) 02:31, 27 June 2017 (UTC)
 * I tend to agree with on this. I was reading an article about a Russian composer, and was surprised to find that clicking on the O.S. link brought me to an article about "the 18th-century changes in calendar conventions used by Great Britain and its colonies", with no information whatsoever about Russian use. A link to the "Adoption" article would be way more useful. —capmo (talk) 14:03, 5 June 2018 (UTC)

Just to wrap this up, it is clear that there is insufficient consensus for change, so the proposal is withdrawn. --John Maynard Friedman (talk) 21:02, 9 January 2019 (UTC)

Template-protected edit request on 26 October 2018
The periods in  should be removed in accordance with MOS:ABBR. Thanks, 142.160.89.97 (talk) 02:45, 26 October 2018 (UTC)
 * Red information icon with gradient background.svg Not done: Periods are used in the article. —&thinsp;JJMC89&thinsp; (T·C) 06:10, 28 October 2018 (UTC)

Alternative link parameter
For use in articles where linking "O.S." to the article about dates in Great Britain is inappropriate, such as Dmitri Mendeleev, it would be useful to be able to specify a different target (here Adoption of the Gregorian calendar). Hairy Dude (talk) 03:19, 17 November 2018 (UTC)
 * Support This would be another way to solve the problem that I raised (unsuccessfully) at above. I don't know how to do it, unfortunately!--John Maynard Friedman (talk) 15:23, 28 March 2019 (UTC)

Unlinking O.S.
It would be very helpful to have a parameter which unlinks O.S., for example on Battle of Ronas Voe, it's linked 12 times, including four times in four sentences, and four times in three sentences later on. The Rambling Man (talk) 13:09, 28 March 2019 (UTC)
 * Suppport per nom. --John Maynard Friedman (talk) 15:23, 28 March 2019 (UTC)

Conforming to MOS when using mdy dates
MOS:DATE requires a comma after the day when using mdy dates, e.g. "February 2, 1905". The example given here has no comma: produces February 2 &#91;O.S. January 20&#93; 1905. This should be February 2 &#91;O.S. January 20&#93;, 1905. The template currently doesn't recognize that mdy is in use and so doesn't add the necessary comma. Hairy Dude (talk) 17:15, 22 February 2020 (UTC)
 * For an example where I didn't switch to mdy because it looks ugly with this template, see Barbara von Krüdener. Hairy Dude (talk) 17:20, 22 February 2020 (UTC)

Automatic recalculation or verification of manually entered parameters
Tell me, are you interested in such features? I have already made such a module and now I am implementing it in ru.wp (collect the parameters by the bot and check that the work of the template is not changing in any way for the correct parameters). For example, articles templates in which data is presumably incorrect can be placed in a separate hidden category. However, in such a situation it will obviously be more difficult to change the display format of the template. See also. ·Carn· !? 16:21, 4 March 2021 (UTC)


 * Yes!
 * The new implementation of the template must support the following features:
 * Automatic recognition of DMY/MDY date formats (note the comma after "]" in the MDY date format):
 * → 2 February [O.S. 20 January] 1905
 * → February 2 [O.S. January 20], 1905
 * Automatic recognition of short month format:
 * → 2 Feb [O.S. 20 Jan] 1905
 * → Feb 2 [O.S. Jan 20], 1905
 * Expanded output when the years differ:
 * → 10 January 1706 [O.S. 30 December 1705]
 * → January 10, 1706 [O.S. December 30, 1705]
 * An option to hide the year/years (the year must still be specified as the conversion depends on it):
 * → 2 February [O.S. 20 January]
 * → February 2 [O.S. January 20]
 * An option to link "O.S." to the Old Style and New Style dates article (links should be disabled by default to discourage duplicate linking):
 * → 2 February &#91;O.S. 20 January] 1905
 * → February 2 &#91;O.S. January 20], 1905
 * Support for the old three-parameter invocation (but with a comma after "]" in the MDY date format):
 * → 2 February [O.S. 20 January] 1905
 * → February 2 [O.S. January 20], 1905
 * (This is a temporary compatibility feature that will be removed once all errors marked by a special hidden category are resolved.)
 * The bot must support the following features:
 * Replacement of old three-parameter undefined invocations (3054 transclusions as of 26 April 2021) with new one-parameter invocations (if the computed date doesn't match the manually specified date, don't replace and add the special hidden category):
 * Replacement of invocations (209 transclusions as of 26 April 2021) with new one-parameter undefined invocations (if the computed date doesn't match the manually specified date, don't replace and add the special hidden category):
 * invocations (201 transclusions as of 26 April 2021) will have to be replaced with new … no invocations manually as it is impossible to automatically deduce the year. I can do this work when the new implementation of the template goes live. I can also resolve the errors marked by the special hidden category and delete and  templates once all their transclusions are gone.
 * — UnladenSwallow (talk) 00:19, 26 April 2021 (UTC)
 * Thank you for the detailed terms of reference! ·Carn· !? 04:13, 26 April 2021 (UTC)
 * invocations (201 transclusions as of 26 April 2021) will have to be replaced with new … no invocations manually as it is impossible to automatically deduce the year. I can do this work when the new implementation of the template goes live. I can also resolve the errors marked by the special hidden category and delete and  templates once all their transclusions are gone.
 * — UnladenSwallow (talk) 00:19, 26 April 2021 (UTC)
 * Thank you for the detailed terms of reference! ·Carn· !? 04:13, 26 April 2021 (UTC)
 * Thank you for the detailed terms of reference! ·Carn· !? 04:13, 26 April 2021 (UTC)


 * My thanks too. When you say will have to be replaced with new … no invocations manually as it is impossible to automatically deduce the year, may I assume that these will also go in the special category for checking? --John Maynard Friedman (talk) 08:03, 26 April 2021 (UTC)
 * Now, while in ru.wp, I will begin to redo the module, taking out internationalization data separately. Along the way, it turns out that it is desirable to take out part of the module's functionality so that it can be used in other modules, so I don't promise a quick result. But yes, I will try to separate such cases into a separate category. ·Carn· !? 10:01, 27 April 2021 (UTC)
 * I think maybe that I wasn't being clear (and now make a suggestion that may make the coding more general and thus simpler): could you simply identify the cases where conversion fails for any reason, since they will all need manual intervention. Of course 'no year specified' and 'arithmetic error' are going to be the most common but no doubt there are other oddities. --John Maynard Friedman (talk) 11:03, 27 April 2021 (UTC)
 * Perhaps it would be easier to write the new implementation of undefined from scratch, as its feature set is very simple (simpler than what is required in the Russian Wikipedia)? Just a thought. — UnladenSwallow (talk) 23:03, 27 April 2021 (UTC)


 * What I meant is that it is impossible to write a bot that would automatically convert to the new undefined, as the difference between Gregorian and Julian dates depends on the year (which is absent in  ), therefore, I/we will have to do this conversion manually. There's no point in adding the special hidden category to pages that transclude  , as we already have the list of such pages. For undefined and  , you are right that we must add the special hidden category for any type of conversion mistake so it can be fixed by a human. — UnladenSwallow (talk) 22:47, 27 April 2021 (UTC)


 * What makes you think it would be easier than on ru.wp? Do they have two formats of date (DMY, M,DY) like we do? I doubt it. Both WPs have to cover 1752 and 1917.
 * The present templates can't handle dates after 17 Dec (OS) or before 13 Jan (NS) because the year number changes. It needs a rewrite and this proposal is already running on ru.wp so let's grab the offer with both hands. --John Maynard Friedman (talk) 23:32, 27 April 2021 (UTC)
 * Sorry for delay, yes, we have several formats, and we have some templates copied from another wikis, i copied the functions I'll need, though I don't see that there is some module for modules for date parsing (maybe I hasn't looked for it properly). ·Carn· !? 16:00, 7 June 2021 (UTC)
 * See Template talk:OldStyleDate/temp - I may have confused the new and old date styles, but in principle it is clear that instead of a family of templates, one universal one can be made, which will itself eliminate duplication of the year (and month, maybe). Partial dates without year specified, of course, cannot be transferred from one date style to another, but we can detect the abnormal difference between them. ·Carn· !? 12:09, 14 June 2021 (UTC)

JULGREGDATUM template
I occasionally translate pages from German to English, where the English language page is either missing or has less information. I just came across the template JULGREGDATUM which appears to do a similar, but IMO better, job in German language. When I translated a page incorporating this template without change, it appeared to do the same as the template OldStyleDate, but the result is much less readable and useful than the German template JULGREGDATUM.

I.e. the result of in a German language page is '10. Novemberjul. / 23. November 1903greg.'

Whereas using the same template in an English page produces '23 [O.S. 1903] 11' which is far less readable and does not include the date conversion.

Attempting to use the OldStyleDate template produces poorly readable results, e.g.

23 11 also produces '23 [O.S. 1903] 11' which is far less readable.

I am British English and the terms Old Style (O.S.) and New Style (N.S.) were not familiar to me, although Julian and Gregorian calendars are, whereas presenting 2 dates with superscripts including links to Gregorian and Julian calendar descriptions is much more readable and usable. The automatic date conversion is also useful.

I have never created a template before, but I will see whether I can create an English version of JULGREGDATUM. I will call it JULGREGDATE or JulGregDate.Lkingscott (talk) 09:09, 18 May 2023 (UTC)
 * But the correct way to use OldStyleDate for that example is 23 November 1903 which produces 23 November 1903.
 * Have you read Old style and new style dates? It is very complicated: Catholic Europe adopted the Gregorian calendar in 1582, Protestant Europe took up to 200 years to follow suit. Orthodox Europe took even longer (civil calendar only). Adoption of 1 January as start of year varied, even in (what was to become) the United Kingdom: Scotland did so from 1600, England waited until 1752. So 1 March 1700 in Scotland was on an entirely different day than 1 March 1700 in England, let alone in France. It can't be done automatically without knowing the context. --𝕁𝕄𝔽 (talk) 09:58, 18 May 2023 (UTC)
 * I wonder if you have set us off diwn the garden path by raising OS/NS? I'm not sure that it matters. Today is 18 May 2023 Gregorian, which equates to 31 May 2023 Julian. But that still leaves us with the start of year problem: 1 March 1700 Julian in Scotland equated to 1 March 1699 in England. Just to ignore the "start of year" problem is common but is generally explained beforehand. It can really mess up historical narrative if done blindly. --𝕁𝕄𝔽 (talk) 10:44, 18 May 2023 (UTC)
 * It could be done algorithmically, but the coding might be "entertaining". Something like yyyy where soy= (start of year) is ignored from 1753 onwards and mandatory for earlier years. No doubt chatgpt will write it for you in a few milliseconds. 𝕁𝕄𝔽 (talk) 11:28, 18 May 2023 (UTC)