Open main menu

Wikimedia Commons β

Template talk:Other date

Info non-talk.svg Template:Other date has been protected indefinitely because it is a highly-used or visible template. Use {{Edit request}} on this page to request an edit.
Please test any changes in the template's /sandbox or /testcases subpages, or in a user subpage, and consider discussing changes at the talk page before implementing them.


betweenEdit

{{other date|?}} yields "Unknown date", and {{other date|between|1800|1825}} yields "between 1800 and 1825". At the moment {{other date|?|1800|1825}} yields "Unknown date", I'd prefer "between 1800 and 1825": less typing, no obvious conflict. –Be..anyone (talk) 13:56, 17 January 2015 (UTC)

I am fine with adding a shortcut for workd 'Between', but it should not be string or character that is already used for something else. "-" is already taken for "from-until", but we could use "~", "<->", "/", or something else that might be easy to remember. --Jarekt (talk) 22:48, 17 January 2015 (UTC)
? would be easy to remember, and at the moment it ignores {{{2}}} and {{{3}}}. Recycling it as shortcut for between could fix this "bug", or rather, I don't see how that could be a "feature". Maybe it needs temporary tracking to check that nobody used this undocumented behaviour (bug or feature) for something, that is not between. –Be..anyone (talk) 01:04, 18 January 2015 (UTC)
I am not sure what you mean by undocumented feature. "?" is listed as an alternative to "Unknown" and "unknown" does not take any arguments. --Jarekt (talk) 03:05, 18 January 2015 (UTC)
"Undocumented" = not listed in the table with two dates, only listed in a table for one date. Quick test: {{other date|?|1800}} yields "Unknown date", so that's also not used. I stumbled over ? by trial+error, looking in the docu for two dates only later, when ? didn't do what I wanted. Be..anyone (talk) 03:42, 18 January 2015 (UTC)
Update: The bug is now documented, and no date got its own table for more test cases (date operators with no date expecting one or two dates.) –Be..anyone (talk) 12:33, 5 February 2015 (UTC)
@Jarekt:: What is the proper way to enter an uncertain date? I would really like to output something like "1608?", but there doesn't seem to be an i18n compatible way to do that. Personally, I think it would make more sense if {{other date|?|1608}} output "1608?" rather than "Unknown date". Could we add that if there isn't another way already? Kaldari (talk) 22:33, 5 April 2016 (UTC)
"?" seems to be quite international so why not just "1608?" Unless the sign is different in other oriental languages. I am fine with adding it. {{other date|?|1608}} doesn't expect parameter, but we could have a different behavior if parameter is provided. So go ahead or I can try it tomorrow. --Jarekt (talk) 02:23, 6 April 2016 (UTC)

Template was rewritten in LuaEdit

This template was rewritten in Lua, see Module:Complex date and Module:I18n/complex date. Also I am working on a new template {{Complex date}} which will be able to replace most of the nested {{Other date}} templates. For example {{other date|-|{{other date|early|{{other date|century|20}}}}|{{other date|mid|{{other date|century|21}}}}}} will be replaced with {{Complex date|adj1=early|date1=20|conj=-|adj2=mid|date2=21|precision=century}} giving "from early 20th century until mid 21st century". However {{Complex date}} is not ready for prime-time yet, since it needs some more development, better documentation, and much more testing. Module:Complex date will also be the core of {{Circa}} and {{Era}}. --Jarekt (talk) 14:10, 27 January 2015 (UTC)

Wow that's huge work, thanks. -Zolo (talk) 07:45, 29 January 2015 (UTC)
I am now slowly working on templates that will rely on the new module, since I would like to have a single place there all translations are kept. And working on template documentation and testing, but pretty soon I will go back to the LUA coding, since at least in Polish many complex phrases have wrong grammatical cases. How are complex phrases in French? Are they OK? I was thinking about expending the mechanism similar to the one currently used for "turn of the ..." options where if one uses one of those options is equivalent to calling {{Complex date|adj1=late|date1=...|conj=and|adj2=early|date2=...|precision=...}} and the code first tries to use the specialized "turn of the ..." option but if it is not found than builds it from individual phrases. I suspect that for some languages we might have to have many specialized phrases and for some (like English) it is easy to build them up from simpler phrases. --Jarekt (talk) 14:17, 29 January 2015 (UTC)
Yes, from what I have seen French is ok, except circa, where "le" should be added before that day when there is one: you say "vers mai 1900", but "vers le 2 mai 1900", not "vers 2 mai 1900".
Another small point I was wondering about: 1990s is "date1=1990, precision1 = decade", which sounds sensible, but 20th century is "date1=20, precision=century". "date1=1900, precision=century" would be logically more consistent, and also more consistent with Wikibase - though I don't know if that would be too convenient given legacy formats. --Zolo (talk) 16:39, 29 January 2015 (UTC)
User:Zolo I corrected French spelling and added code to allow YY00 and Y000 formats for centuries and millennia. --Jarekt (talk) 05:11, 1 February 2015 (UTC)

{{otherdate|c|999}} not supported?Edit

Hi, it seems that {{otherdate|c|date}} is no longer supported. {{otherdate|ca|date}} works. I've used ...|c|... often and now this causes the following error message: "Error in Module:Complex date: c is not recognized.". Greetz! Bukk (talk) 09:22, 4 February 2015 (UTC)

Thanks for alerting me. I will make sure to fix it at the next update. --Jarekt (talk) 13:42, 5 February 2015 (UTC)

PL monthsEdit

In Polish are incorrect names of months! Eg. "po 1 styczniu" -> It should be "po 1 stycznia"! "po 1 marcu" -> "po 1 marca" etc. Please repair it. --Wojsław Brożyna (talk) 12:44, 27 July 2016 (UTC)

Does it end with “o” in every case? E.g. before 1 January, after 1 January, between 1 January and 1 March? Also in other context, e.g. 2 January or simply January 2016? If so, I think it will be easy to correct it, if it’s more complex, it will be harder. --Tacsipacsi (talk) 10:44, 28 July 2016 (UTC)
Wojsław Brożyna I am not sure of the proper form. If we just have month than en:Locative case (Miejscownik) is correct, for example "po wrześniu 1939" (as in here). So {{complex date|adj=after|date=1939-09|lang=pl}} gives "po wrześniu 1939". In case of full date {{complex date|adj=after|date=1939-09-01|lang=pl}} gives "po 1 wrześniu 1939" or "po pierwszym wrześniu 1939" which sounds wrong. Correct form would be "po pierwszym września 1939" or "po 1 września 1939". So the declination case changes with the precision of the date? @Boston9, Yarl: can you verify the proper grammar here before I change it. Grammar and orthography was always my weak spot. Are there other dates in Module:I18n/complex_date with similar issue? --Jarekt (talk) 19:17, 28 September 2017 (UTC)
"po pierwszym września 1939" is the correct form indeed. Yarl 💭  15:09, 4 October 2017 (UTC)

Maintenance categoryEdit

Is it possible to add a maintenance category for "between" dates where the first values is bigger than the second? Or does that cost too much? --Arnd (talk) 17:15, 28 September 2017 (UTC)

Good idea. I will try to add it. --Jarekt (talk) 18:36, 28 September 2017 (UTC)
Arnd Actually once I think about it it is hard to order the dates especially if we mix precision and BC and AC dates. It can be done but it would not be easy. --Jarekt (talk) 19:25, 28 September 2017 (UTC)
Thanks Jarekt for you reply. Maybe for the start we could only compare them when both have the same format, i. e. YYYY or YYYY-MM or YYYY-MM-DD? --Arnd (talk) 06:48, 29 September 2017 (UTC)
Arnd I looked at this and it would require a lot of changes in a code. The issue is that at the moment the code does not have any understanding of the meaning of what is processed and is only concerned with taking a string and converting it to another translated string. To do it properly We would have to probably convert each date to a Julian day number using Module:Calendar and do tests on those. It is a little more than I want to undertake right now, I will try to do it after I am done with the next version of Module:Creator. --Jarekt (talk) 18:34, 4 October 2017 (UTC)

from-until vs. betweenEdit

Often i see dates with the form xxxx-yyyy. Would you convert them into the from-until or the between format? What is actually the difference between them? --Arnd (talk) 09:09, 5 March 2018 (UTC)

It is a slight difference related to how long the event lasted. for Example: Birth happen at some point between 1111 and 1113, but someone was active from 1111 to 1113. Someone is in university from 1111 to 1113, but graduated between 1111 and 1113. Both can be encoded as 1111-1113. --Jarekt (talk) 17:07, 5 March 2018 (UTC)
But what would be the best to convert to such dates? The same is for dates xxxx/yyyy which could mean or or and. --Arnd (talk) 19:00, 5 March 2018 (UTC)
I do not think you can easily convert without context xxxx-yyyy could mean either, but if you know that we are talking date of birth or death than we know it is "between" and if it is work-period than it is from-to. --Jarekt (talk) 19:35, 5 March 2018 (UTC)
Return to "Other date" page.