Template talk:OldStyleDate

Latest comment: 11 months ago by John Maynard Friedman in topic JULGREGDATUM template

Conforming to user preferences edit

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)Reply

The template's output reads shity when the dates are in different years. E.g. {{OldStyleDate|January 10|1906|December 28, 1905}} becomes January 10 [O.S. December 28, 1905] 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)Reply

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)Reply

New template edit

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

Fontsize change edit

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. Snow talk 15:11, 18 January 2015 (UTC)Reply

Discussion notice edit

See Template talk:OldStyleDateDY for a discussion about a proposed cosmetic change to the output from this template as well as two others. ―Mandruss  07:50, 4 May 2016 (UTC)Reply

Proposal to change the target of this template edit

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: {{{1}}} [[[Adoption of the Gregorian calendar|O.S.]] {{{3}}}]{{#if: {{{2|}}}| {{{2|}}}|}}
(instead of {{{1}}} [[[Old Style and New Style dates|O.S.]] {{{3}}}]{{#if: {{{2|}}}| {{{2|}}}|}} ).

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)Reply

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)Reply
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)Reply
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)Reply
I tend to agree with John Maynard Friedman 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)Reply

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)Reply

Template-protected edit request on 26 October 2018 edit

The periods in [[Old Style and New Style dates|O.S.]] should be removed in accordance with MOS:ABBR. Thanks, 142.160.89.97 (talk) 02:45, 26 October 2018 (UTC)Reply

  Not done: Periods are used in the article. — JJMC89(T·C) 06:10, 28 October 2018 (UTC)Reply

Alternative link parameter edit

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#Adoption in Eastern Europe). Hairy Dude (talk) 03:19, 17 November 2018 (UTC)Reply

Unlinking O.S. edit

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)Reply

Conforming to MOS when using mdy dates edit

MOS:DATE requires a comma after the day when using mdy dates, e.g. "February 2, 1905". The example given here has no comma: {{OldStyleDate|February 2|1905|January 20}} produces February 2 [O.S. January 20] 1905. This should be February 2 [O.S. January 20], 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)Reply

Automatic recalculation or verification of manually entered parameters edit

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 T276471. ·Carn·!? 16:21, 4 March 2021 (UTC)Reply

@Carn: 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):
{{OldStyleDate|2 February 1905}} → 2 February [O.S. 20 January] 1905
{{OldStyleDate|February 2, 1905}} → February 2 [O.S. January 20], 1905
  • Automatic recognition of short month format:
{{OldStyleDate|2 Feb 1905}} → 2 Feb [O.S. 20 Jan] 1905
{{OldStyleDate|Feb 2, 1905}} → Feb 2 [O.S. Jan 20], 1905
  • Expanded output when the years differ:
{{OldStyleDate|10 January 1706}} → 10 January 1706 [O.S. 30 December 1705]
{{OldStyleDate|January 10, 1706}} → 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):
{{OldStyleDate|2 February 1905|year=no}} → 2 February [O.S. 20 January]
{{OldStyleDate|February 2, 1905|year=no}} → February 2 [O.S. January 20]
{{OldStyleDate|2 February 1905|link=yes}} → 2 February [O.S. 20 January] 1905
{{OldStyleDate|February 2, 1905|link=yes}} → February 2 [O.S. January 20], 1905
  • Support for the old three-parameter invocation (but with a comma after "]" in the MDY date format):
{{OldStyleDate|2 February|1905|20 January}} → 2 February [O.S. 20 January] 1905
{{OldStyleDate|February 2|1905|January 20}} → 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 {{OldStyleDate}} 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):
{{OldStyleDate|2 February|1905|20 January}}{{OldStyleDate|2 February 1905}}
{{OldStyleDate|February 2|1905|January 20}}{{OldStyleDate|February 2, 1905}}
  • Replacement of {{OldStyleDateDY}} invocations (209 transclusions as of 26 April 2021) with new one-parameter {{OldStyleDate}} invocations (if the computed date doesn't match the manually specified date, don't replace and add the special hidden category):
{{OldStyleDateDY|10 January|1706|30 December 1705}}{{OldStyleDate|10 January 1706}}
{{OldStyleDateDY|January 10,|1706|December 30, 1705}}{{OldStyleDate|January 10, 1706}}
{{OldStyleDateNY}} invocations (201 transclusions as of 26 April 2021) will have to be replaced with new {{OldStyleDate|…|year=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 {{OldStyleDateDY}} and {{OldStyleDateNY}} templates once all their transclusions are gone.
— UnladenSwallow (talk) 00:19, 26 April 2021 (UTC)Reply
Thank you for the detailed terms of reference! ·Carn·!? 04:13, 26 April 2021 (UTC)Reply
My thanks too. When you say will have to be replaced with new {{OldStyleDate|…|year=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)Reply
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)Reply
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)Reply
Perhaps it would be easier to write the new implementation of {{OldStyleDate}} 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)Reply
What I meant is that it is impossible to write a bot that would automatically convert {{OldStyleDateNY}} to the new {{OldStyleDate}}, as the difference between Gregorian and Julian dates depends on the year (which is absent in {{OldStyleDateNY}}), therefore, I/we will have to do this conversion manually. There's no point in adding the special hidden category to pages that transclude {{OldStyleDateNY}}, as we already have the list of such pages. For {{OldStyleDate}} and {{OldStyleDateDY}}, 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)Reply
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)Reply
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)Reply
See Template talk:OldStyleDate/temp#Test - 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)Reply

JULGREGDATUM template edit

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 {{JULGREGDATUM|23|11|1903|Link=1}} 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.

{{OldStyleDate|23|11|1903}} 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)Reply

But the correct way to use {{OldStyleDate}} for that example is {{OldStyleDate|23 November|1903|10 November}} which produces 23 November [O.S. 10 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)Reply
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)Reply
It could be done algorithmically, but the coding might be "entertaining". Something like JulToGreg|yyyy|mm|dd|soy=ddmm 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)Reply