Module talk:I18n/complex date

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

$date0[edit]

Jarekt, I noticed that several of the translations are using $date0, which is never string substituted by Module:Complex date. The origin of the $date0 was this edit. I think all instances of $date0 can be replaced with $date1. —RP88 (talk) 02:00, 9 January 2015 (UTC)[reply]

No, "$date0" had a special purpose in the earlier version of the code like this one. It was used to insert the original unprocessed dateString. However I an trying to get away from using all or most wikicode in the strings stored at i18n page and replace them with lua functions most uses of $data0 are to check if the date was a year or year-month ("{{IsNum|$date0}}" ) which will be now replaced with test of "state.precision1". See "fr" entries in d:Module:Daterange. --Jarekt (talk) 03:19, 9 January 2015 (UTC)[reply]
Ah, I see, the $date0 stuff is currently non-functional as I caught you in the middle of a change. Thanks for the explanation and sorry for the interruption. —RP88 (talk) 03:53, 9 January 2015 (UTC)[reply]

FR rules for century and millennium[edit]

I have a suggestion for improving the handling of century and millennium in French. In French "siècle" and "millénaire" are both masculine so ordinals for 1st century and millennium should be a Roman Ier not Ie, e.g fr:Ier_millénaire. So, I think in the century table the 'fr' rule might be better as:

['fr']=function(date1, state) return Ordinal(date1, 'fr', 'roman', 'm') .. ' siècle' end,

Similarly, in the millennium table the 'fr' rule might be better as:

['fr']=function(date1, state) return Ordinal(date1, 'fr', 'roman', 'm') .. ' millénaire' end,

RP88 (talk) 03:53, 9 January 2015 (UTC)[reply]

Feel free to change it, but we might want to change it in template version as well if it is possible. --Jarekt (talk) 05:12, 9 January 2015 (UTC)[reply]
OK, I've updated this page (also did "turn of the century") and made a protected edit request at Template:other date. —RP88 (talk) 09:39, 9 January 2015 (UTC)[reply]
Great. thanks. If you feel like tackling other issues in Module:I18n/complex date that would be great. At the moment I am just trying to reproduce the current capabilities of Template:Other date in all supported languages, before tackling the "expanded" capabilities. Eventually I will try to get calls like {{complex date|mod1=early|date1=20|junction=-|mod2=mid|date2=21|precision=century}} correct in any language and start replacing nested "other date" template calls like: {{other date|-|{{other date|early|{{other date|century|20}}}}|{{other date|mid|{{other date|century|21}}}}}}. See here for more discussion. --Jarekt (talk) 12:59, 9 January 2015 (UTC)[reply]

CS "turn of the decade"[edit]

I will be testing and working on better documentation of "turn of the ..." options, for all languages. Code comments seem to be backward and we need more test cases. Stay tuned... --Jarekt (talk) 14:48, 2 February 2015 (UTC)[reply]

Passing case to sub-dates[edit]

For a date like {{other date/sandbox|conj=between|date1=2014-02-04|date2=2014-05-09}}, the code is able to express the grammatical case of sub-expressions for the used conjunction (e.g. in Czech, between is defined as cs={'mezi $date1 a $date2', case={'ins','ins'}}, i.e. use instrumental case for both components). When the sub-date is ISO date, this seems to work correctly: “mezi 4. únorem 2014 a 9. květnem 2014

date QS:P,+2014-00-00T00:00:00Z/9,P1319,+2014-02-04T00:00:00Z/11,P1326,+2014-05-09T00:00:00Z/11

”, which is different than the nominative case used at e.g. “4. února 2014 a 9. května 2014”. Until here, perfect. However, the case seems not to be passed/used when the sub-expression is a complex date, e.g. for {{other date/sandbox|conj=between|adj1=late|date1=2014|adj2=late|date2=2015}}, the result is “mezi konec 2014 a konec 2015”, which has both sub-dates in nominative, identical to “konec 2014 a konec 2015”.

I wanted to differentiate the translation of e.g. late based on this “parent case”, but I don’t think the case is passed at all. I guess it could be passed as a part of state?

--Mormegil (talk) 13:05, 4 February 2015 (UTC)[reply]

That is something I am working towards. First got the module to be equivalent to {{Other date/old}}. Now improving some translations and building 2 pass capability (so {{other date/sandbox|conj=turn of the year|adj1=|date1=2014|adj2=|date2=2015}} is equivalent to {{other date/sandbox|conj=and|adj1=late|date1=2014|adj2=early|date2=2015}} and if there is no translation of the first one than the second one is called). But eventually I am hoping to be creating grammatically correct complex phrases, that before you have to create using nested calls to {{Other date}}. The template for that will be {{Complex date}}. The trick is to do it without breaking current {{Other date}} capabilities.
I just created Module:I18n/complex date/sandbox called by Module:Complex date/sandbox, {{Other date/sandbox}} and {{Other date/testcases}} and added fields case1, case2 and case to state. So it now has
  • state.adj1, state.adj2, state.adj
  • state.precision1, state.precision2, state.precision
  • state.units1, state.units2, state.units
  • state.era1, state.era2, state.era
  • state.case1, state.case2, state.case
  • nDates
  • special
  • conj
The state.case, state.era, state.units, state.precision, state.adj are equal to state.case1,... or state.case2, ... depending if it is the first or the sub-phrase related to first or second date. Feel free to experiment with the sandbox templates and modules. --Jarekt (talk) 14:25, 4 February 2015 (UTC)[reply]

--Jarekt (talk) 14:25, 4 February 2015 (UTC)[reply]

bn translation[edit]

{{Edit request}} Please add:

['from-until'] = {
 bn='$date1 থেকে $date2 পর্যন্ত',

|between
 bn='$date1 এবং $date2-এর মাঝামাঝি',

|or
  bn='$date1 অথবা $date2',

|and
  bn='$date1 এবং $date2',

|by
 bn='$date1 কর্তৃক',

|before
 bn='$date1-এর আগে',

|from
  bn='$date1 থেকে',

['until'] = {
 bn='$date1 পর্যন্ত',

|after
  bn='$date1-এর পরে',

|early
 bn='$date1-এর শুরুতে',

|mid
 bn='$date1-এর মাঝামাঝি',

|late
 bn='$date1-এর শেষে',

['circa'] = {
 bn='প্রায় $date1',

['year unknown']= {
 bn='অজানা বছর',

|1st half
 bn='$date1-এর প্রথমার্ধ',

|2nd half
 bn='$date1-এর দ্বিতীয়ার্ধ',

|1st quarter
 bn='$date1-এর প্রথম ত্রৈমাসিক',

|2nd quarter
 bn='$date1-এর দ্বিতীয় ত্রৈমাসিক',

|3rd quarter
 bn='$date1-এর তৃতীয় ত্রৈমাসিক',

|4th quarter
 bn='$date1-এর চতুর্থ ত্রৈমাসিক',

['spring'] = {
 bn='বসন্তকাল $date1',

['summer'] = {
 bn='গ্রীষ্মকাল $date1',

['autumn'] = {
 bn='শরত্কাল $date1',

['winter'] = {
 bn='শীতকাল $date1',

|decade
 bn='$date1-এর দশক',

|century
 bn=function(date1, state) return Ordinal(date1, 'bn') .. ' শতাব্দী' end,

| millennium
 bn=function(date1, state) return Ordinal(date1, 'bn') .. ' সহস্রাব্দ' end,

|turn of the century
 bn=function(date1, date2, state) return '$date1/' .. Ordinal(date2, 'bn') .. ' শতাব্দীর পালাবদলে' end,

|turn of the decade
 bn='$date1-এর দশকের শেষে এবং $date2-এর দশকের শুরুতে',

|turn of the year
 bn='$date1-এর শেষে এবং $date2-এর শুরুতে',

['circa2'] = {
 bn='প্রায় $date1 এবং প্রায় $date2-এর মাঝামাঝি',

['julian'] = {
 bn='$date1 (জুলিয়ান ক্যালেন্ডারে $date2)',

--Aftab (talk) 16:20, 4 February 2015 (UTC)[reply]

✓ Done Thank you. ~ Nahid Talk 16:58, 4 February 2015 (UTC)[reply]

Until - the translation into Russian.[edit]

«until» - «вплоть до». This is not the simplest, but the most accurate translation. Радион (talk) 19:43, 10 February 2015 (UTC)[reply]

✓ Done Now {{other date|until|1999-09-19|lang=ru}} gives "не позже 19 сентября 1999
date QS:P,+1999-09-19T00:00:00Z/7,P582,+1999-09-19T00:00:00Z/11
"--Jarekt (talk) 14:08, 12 February 2015 (UTC)[reply]

need to add for hebrew (HE)[edit]

['year unknown'] -> he='שנה לא ידועה'.

['1quarter'] -> he='רבעון ראשון של $date1'.

['2quarter'] -> he='רבעון שני של $date1'.

['3quarter'] -> he='רבעון שלישי של $date1'.

['4quarter'] -> he='רבעון רביעי של $date1'.

tnx, Yona B. (t) 14:22, 15 April 2015 (UTC)[reply]

Thanks Yona B.. All done. By the way there are some more Hebrew translations missing on this page, see Template:Other_date/testcases. May be you can help with those too. --Jarekt (talk) 15:24, 15 April 2015 (UTC)[reply]
miss them:
['julian'] -> he='$date1 ($date2 בהלוח היוליאני)',
['ah'] -> he='$date1 להג'רה',
decade are problematic because it not really in use on hebrew and when it use it have 2 version: 'שנות ה-$date1' when we speak on decade in a century (like 60s). and we use 'העשור ה-$date1' when we skeap on the N-decades in the century. i think that the first is the most used and this is the correct form, but i am not sure. Yona B. (t) 05:56, 16 April 2015 (UTC)[reply]
Thanks, I added those. We are still missing Hebrew translations for 'until', 'millennium', 'turn of the century', 'turn of the decade', 'turn of the year', and 'bp'. Maybe you can help with those as well. --Jarekt (talk) 13:07, 16 April 2015 (UTC)[reply]

hsb translation[edit]

{{Edit request}} Please add:

yearCase = {
 hsb={insP='lětami', ins='lětom', gen='lěta', loc='lěće'}

centuryCase = {
 hsb={nom='lětstotk', gen='lětstotka', ins='lětstotkom', loc='lětstotku', default = 'lětstotk'}

millenniumCase = {
 hsb={nom='lěttysac', gen='lěttysaca', ins='lěttysacom', loc='lěttysacu', default = 'lěttysac'}

['from-until'] = {
 hsb={'wot $date1 do $date2', case={'gen','gen'}},

|between
 hsb={'mjez $date1 a $date2', case={'ins','ins'}},

|or
 hsb='$date1 abo $date2',

|and
 hsb='$date1 a $date2',

|by
 hsb={'do $date1', case={'gen',''}},

|before
 hsb={'do $date1', case={'gen',''}},

|from
 hsb={'wot $date1', case={'gen',''}},

['until'] = {
 hsb={'do $date1', case={'gen',''}},

|after
 hsb={'po $date1', case={'loc',''}},

|early
 hsb={'spočatk $date1', case={'gen',''}},

|mid
 hsb={'srjedź $date1', case={'gen',''}},

|late
 hsb={'kónc $date1', case={'gen',''}},

['circa'] = {
 hsb={'wokoło $date1', case={'gen',''}},

['year unknown']= {
 hsb='lěto njeznate',

|1st half
 hsb={'prěnja połojca $date1', case={'gen',''}},

|2nd half
 hsb={'druha połojca $date1', case={'gen',''}},

|1st quarter
 hsb={'prěnja štwórćina $date1', case={'gen',''}},

|2nd quarter
 hsb={'druha štwórćina $date1', case={'gen',''}},

|3rd quarter
 hsb={'třeća štwórćina $date1', case={'gen',''}},

|4th quarter
 hsb={'poslednja štwórćina $date1', case={'gen',''}},

['spring'] = {
 hsb='nalěćo $date1',

['summer'] = {
 hsb='lěćo $date1',

['autumn'] = {
 hsb='nazyma $date1',

['winter'] = {
 hsb='zyma $date1',

|decade
 hsb='$date1te lěta',

|century
 hsb='$date1. lětstotk',

| millennium
 hsb='$date1. lěttysac',

|turn of the century
 hsb=function(date1, date2, state) return 'přechod ' .. Roman(date1) ..' do ' .. Roman(date2) ..' lětstotka' end,

|turn of the decade
 hsb='pózdnje $date1te a zažne $date2te lěta',

|turn of the year
 hsb='kónc $date1/spočatk $date2',

['circa2'] = {
 hsb={'wot něhdźe $date1 do něhdźe $date2', case={'gen','gen'}},

['julian'] = {
 hsb='$date1 ($date2 po julianiskej protyce)',

['ad'] = {
 hsb='$date1 po Chr.',

['bc'] = {
 hsb='$date1 do Chr.',

--j.budissin+/- 13:37, 17 April 2015 (UTC)[reply]

✓ Done thank you for help --Jarekt (talk) 14:54, 17 April 2015 (UTC)[reply]

it translation update[edit]

Please add:

['until'] = {
 it='al $date1',

['1quarter'] = {
 it='primo quarto del $date1',

['2quarter'] = {
 it='secondo quarto del $date1',

['3quarter'] = {
 it='terzo quarto del $date1',

['4quarter'] = {
 it='quarto quarto del $date1',

{{Edit request}} Thanks in advance. --FRacco (talk) 12:05, 13 May 2015 (UTC)[reply]

✓ Done thanks --Jarekt (talk) 13:52, 13 May 2015 (UTC)[reply]

Remove accent mark from Spanish conjunction o[edit]

{{Edit request}} In line 161 (es='$date1 ó $date2',), please replace ó with o. In old printed books, o used to be accentuated in order to distinguish it from neighbouring non-lining numeral 0. That practice has fallen out of use many years ago, and is proscribed by ASALE. —Born2bgratis (talk) 15:01, 21 November 2015 (UTC)[reply]

✓ Done Awesome! Thank you! Steinsplitter (talk) 15:21, 21 November 2015 (UTC)[reply]

From deu translaton[edit]

{{Edit request}} Hallo, die Option "From" sollte auf Deutsch "Seit" und nicht "Ab" heißen: "Seit" bezeichnet einen Zeitpunkt in der Vergangenheit, von dem angefangen etwas dauert.

"Ab" in temporaler Bedeutung steht gewöhnlich bei durativen Verben (sie drücken eine Zeitdauer aus). Der Anfangspunkt liegt gewöhnlich in oder auch nach einer Zeit (d.h.: ab sofort, ab morgen…) In der Vergangenheit wird damit eine Zeitdauer ausgedrückt, die vor einer Zeit endet. "Seit" dient zum Ausdruck einer Zeitdauer, die bis in die Gegenwart reicht. Beispiele:

Ab 1995 lebte sie im Ausland. Nach drei Jahren kehrte sie in die Heimat Zurück. Seit 1999 arbeitet sie nun wieder an unserem Institut.
Oberwil heizt ab dem nächsten Jahr mit Biogas.
Oberwil heizt seit dem letzten Jahr mit Biogas.

Please add:

	['until'] = {
		...
		de='bis $date1',

and change:

	['from'] = {
		...
-		de='Ab $date1'
+		de='Seit $date1'

User: Perhelion (Commons: = crap?)  19:31, 2 December 2015 (UTC)[reply]

✓ Done --Jarekt (talk) 12:36, 3 December 2015 (UTC)[reply]

Slovak (sk) translation[edit]

{{Edit request}} I have added the slovak translation (in the sandbox). It seems there is a problem with "loc" and "ins" cases. I am not able to find why it dont work. Perhaps some missing translations (where?), in Module:Date around line 160 should be added also "sk", ... Please give me hints, where should I make further translations, so it works properly. Thanks--LacoR (talk) 21:49, 15 December 2015 (UTC)[reply]

I moved slovak translation to live version. Thanks for working on this. About remaining problems, if you could list some examples where you call the template with some parameters and it gives wrong results, and tell what it should be and I will see what I can do. --Jarekt (talk) 03:26, 16 December 2015 (UTC)[reply]
Thank your for moving the translation. The remaining problems are for example:
  • {{#invoke:Complex date/sandbox|complex_date|before|1999-05|lang=sk}} renders as ''{{#invoke:Complex date/sandbox|complex_date|before|1999-05|lang=sk}}'' and should be pred májom 1999; the code in module is sk={'pred $date1', case={'ins',''}},
  • {{#invoke:Complex date/sandbox|complex_date|after|1999-05|lang=sk}} renders as ''{{#invoke:Complex date/sandbox|complex_date|after|1999-05|lang=sk}}'' and should be po máji 1999; the code in module is sk={'po $date1', case={'loc',''}},--LacoR (talk) 07:18, 16 December 2015 (UTC)[reply]

LacoR, The problem is that we are missing some translations. See tables below. Once we fill the spaces I can activate support for those cases in Slovak.--Jarekt (talk) 15:03, 16 December 2015 (UTC)[reply]

Thanks Jarekt, I dont have the right to add the translations into the MediaWiki namespace (or I am missing something), so I added the translations to the tables bellow.--LacoR (talk) 18:55, 16 December 2015 (UTC)[reply]
Thanks, I did not have a chance to test it but it might be working now. I will check latter. --Jarekt (talk) 21:41, 16 December 2015 (UTC)[reply]

It looks like your above 2 examples work. Are there any other issues? --Jarekt (talk) 03:34, 17 December 2015 (UTC)[reply]

It seems its OK. Thank you. --LacoR (talk) 07:20, 17 December 2015 (UTC)[reply]

ins[edit]

ru pl cs sl sk be-tarask
январём styczniem lednem januarjem januárom MediaWiki:January-ins/be-tarask
февралём lutym únorem februarjem februárom MediaWiki:February-ins/be-tarask
мартом marcem březnem marcem marcom
апрелем kwietniem dubnem aprilom aprílom
маем majem květnem majem májom
июнем czerwcem červnem junijem júnom
июлем lipcem červencem julijem júlom
августом sierpniem srpnem avgustom augustom
сентябрём wrześniem zářím septembrom septembrom
октябрём paźdźernikiem říjnem oktobrom októbrom
ноябрём listopadem listopadem novembrom novembrom
декабрём grudniem prosincem decembrom decembrom

loc[edit]

ru pl cs sl sk
январе styczniu lednu januarju januári januári
феврале lutym únoru februarju februári februári
марте marcu březnu marcu marci marci
апреле kwietniu dubnu aprilu apríli apríli
мае maju květnu maju máji máji
июне czerwcu červnu juniju júni júni
июле lipcu červenci juliju júli júli
августе sierpniu srpnu avgustu auguste auguste
сентябре wrześniu září septembru septembri septembri
октябре paźdźerniku říjnu oktobru októbri októbri
ноябре listopadzie listopadu novembru novembri novembri
декабре grudniu prosinci decembru decembri decembri

be-tarask[edit]

{{Edit request}}

	['from-until'] = {
		be-tarask={'з $date1 да $date2', case={'gen','gen'}},

	['between']={
		be-tarask={'між $date1 і $date2', case={'ins','ins'}},

	['or'] = {
		be-tarask='$date1 ці $date2',

	['and'] = {
		be-tarask='$date1 і $date2',

	['by'] = {
		be-tarask={'да $date1', case={'gen',''}},

	['before'] = {
		be-tarask={'перад $date1', case={'ins',''}},

	['from'] = {
		be-tarask={'з $date1', case={'gen',''}},

	['until'] = {
		be-tarask={'усутыч да $date1', case={'gen',''}},
	
	['after'] = {
		be-tarask={'пасьля $date1', case={'gen',''}},

	['early'] = {
		be-tarask={'пачатак $date1', case={'gen',''}},

	['mid'] = {
		be-tarask={'сярэдзіна $date1', case={'gen',''}},

	['late'] = {
		be-tarask={'канец $date1', case={'gen',''}},
	
	['circa'] = {
		be-tarask={'каля $date1', case={'gen',''}},

	['year unknown']= {
		be-tarask='Год невядомы',

	['firsthalf'] = {
		be-tarask={'першая палова $date1', case={'gen',''}},

	['secondhalf'] = {
		be-tarask={'другая палова $date1', case={'gen',''}},

	['1quarter']= {
		be-tarask={'першая чвэрць $date1', case={'gen',''}},

	['2quarter']= {
		be-tarask={'другая чвэрць $date1', case={'gen',''}},

	['3quarter']= {
		be-tarask={'трэцяя чвэрць $date1', case={'gen',''}},

	['4quarter']= {
		be-tarask={'чацьвёртая чвэрць $date1', case={'gen',''}},

 	['spring'] = {
		be-tarask='вясна $date1',

	['summer'] = {
		be-tarask='лета $date1',

	['autumn'] = {
		be-tarask='восень $date1',

	['winter'] = {
		be-tarask='зіма $date1',

	['decade'] = {
		be-tarask='$date1-я гады',

	['century'] = {
		be-tarask=function(date1, state) return Ordinal(date1, 'en') .. ' стагодзьдзе' end,

	['millennium'] = {
		be-tarask=function(date1, state) return Ordinal(date1, 'en') .. ' тысячагодзьдзе' end,

	['turn of the century'] = { 
		be-tarask=function(date1, date2, state) return 'канец ' .. Roman(date1) ..' — пачатак ' .. Roman(date2) ..' стагодзьдзя' end,

	['turn of the decade']={
		be-tarask='канец $date1-х — пачатак $date2-х гг.',

	['turn of the year']={
		be-tarask='канец $date1 — пачатак $date2 г.',

	['circa2'] = {
		be-tarask={'прыкладна з $date1 да прыкладна $date2', case={'gen','gen'}},

	['julian'] = {
		be-tarask='$date1 ($date2 паводле {{w|Юліянскі каляндар|ст. ст.|be-tarask}})',
	
	['ad'] = {
		be-tarask ='$date1 {{w|ад Нараджэньня Хрыста|пасьля Н. Х.|be-tarask}}',
	
	['ah'] = {
		be-tarask ='$date1 {{w|Ісламскі каляндар|хіджры|be-tarask}}',
	
 	['bc'] = {
		be-tarask ='$date1 {{w|да Нараджэньня Хрыста|да Н. Х.|be-tarask}}',
	
	['bp'] = {
		be-tarask ='$date1 {{w|да нашых дзён||be-tarask}}',

Thanks in advance,-Renessaince (talk) 03:13, 21 December 2015 (UTC)[reply]

✓ Done Please check. --Jarekt (talk) 04:48, 21 December 2015 (UTC)[reply]
In case "inc" grammatical case is not working right we might have to set it up. If so, please fill Module_talk:I18n/complex_date#ins table with red links and what it should be. --Jarekt (talk) 04:55, 21 December 2015 (UTC)[reply]

Spelling mistake in Polish[edit]

Translation to Polish uses incorrect spelling!

return "przełom lat " .. decade1 .. "-tych i " .. math.floor(date2 % 100) .. "-tych " .. century1 .. " wieku"

should be

return "przełom lat " .. decade1 .. ". i " .. math.floor(date2 % 100) .. ". " .. century1 .. " wieku"

w:pl:Pomoc:Powszechne błędy językowe. Please fix this as soon as possible. --Derbeth talk 15:27, 6 November 2016 (UTC)[reply]

Derbeth ✓ Zrobione. Czy możesz sprawdzić resztę na Template:Other_date#Examples? Dziękuje. --Jarekt (talk) 04:51, 7 November 2016 (UTC)[reply]
Dzięki. Wydaje mi się, że należy poprawić before, after, by: nie "przed 1 marcem" tylko "przed 1 (dniem) marca", "po 1 kwietnia". Mocno kontrowersyjne jest obecne tłumaczenie "turn of the decade" dla pierwszej i drugiej dekady. O ile "lata 20." aż do "lat 90." są oczywiste, to "lata 0." i "lata 10." nie mają szerokiej akceptacji. Proponuję dla tych dwóch zrobić wyjątek i pisać "pierwsza dekada" i "druga dekada" (tak jak zaleca Mirosław Bańko). --Derbeth talk 06:28, 8 November 2016 (UTC)[reply]
Derbeth, Poprawiłem "turn of the decade" i "decade". Teraźniejsza wersja deje:
  • {{other date|turn of the decade|1900|lang=pl}} -> "przełom ostatniej dekady XIX i pierwszej dekady XX wieku"
  • {{other date|turn of the decade|1910|lang=pl}} -> "przełom pierwszej i drugiej dekady XX wieku"
  • {{other date|turn of the decade|1920|lang=pl}} -> "przełom drugiej dekady i lat 20. XX wieku"
  • {{other date|turn of the decade|1990|lang=pl}} -> "przełom lat 80. i 90. XX wieku"
  • {{other date|decade|1900|lang=pl}} -> "pierwsza dekada XX wieku
    date QS:P,+1900-00-00T00:00:00Z/8
    "
  • {{other date|decade|2010|lang=pl}} -> "druga dekada XXI wieku
    date QS:P,+2010-00-00T00:00:00Z/8
    "
  • {{other date|decade|2020|lang=pl}} -> "lata 20. XXI wieku
    date QS:P,+2020-00-00T00:00:00Z/8
    "
  • {{other date|before|1999-03-01|lang=pl}} -> "przed 1 marcem 1999
    date QS:P,+1999-03-01T00:00:00Z/7,P1326,+1999-03-01T00:00:00Z/11
    "
  • {{other date|before|1999-03|lang=pl}} -> "przed marcem 1999
    date QS:P,+1999-03-00T00:00:00Z/7,P1326,+1999-03-00T00:00:00Z/10
    "
  • {{other date|after|1999-03-01|lang=pl}} -> "po 1 marcu 1999
    date QS:P,+1999-03-01T00:00:00Z/7,P1319,+1999-03-01T00:00:00Z/11
    "
  • {{other date|after|1999-03|lang=pl}} -> "po marcu 1999
    date QS:P,+1999-03-00T00:00:00Z/7,P1319,+1999-03-00T00:00:00Z/10
    "
  • {{other date|after|1999|lang=pl}} -> "po 1999
    date QS:P,+1999-00-00T00:00:00Z/7,P1319,+1999-00-00T00:00:00Z/9
    "
Co do "before" i "after" to rzeczywiście są złe ale trudniej poprawić. Pomyślę jak zreperować. --Jarekt (talk) 15:22, 8 November 2016 (UTC)[reply]

"przełom lat 10. i 20. XX wieku" - wolałbym "przełom drugiej dekady i lat 20. XX wieku". --Derbeth talk 21:09, 8 November 2016 (UTC)[reply]

@Derbeth: ✓ Zrobione --Jarekt (talk) 21:43, 8 November 2016 (UTC)[reply]

Norwegian[edit]

{{Edit request}} I don't know why the language code 'no' is used in this and other i18n modules, it should really be nb and nn. Anyways, here are the translations for nb and nn for all of this.

Where I wrote both, the same string should be used for both nb and nn (pretty self-explanatory).

from-until
  • both: $date1 til $date2
between
  • both: mellom $date1 og $date2
or
  • both: $date1 eller $date2
and
  • both: $date1 og $date2
by
  • nb: innen $date1
  • nn: innan $date1
before
  • both: før $date1
from
  • nb: fra $date1
  • nn: frå $date1
until
  • both: til $date1
after
  • both: etter $date1
early
  • nb: tidlig $date1
  • nn: tidleg $date1
mid
  • both: midten av $date1
late
  • nb: sent $date1
  • nn: seint $date1
circa
  • both: ca. $date1
year unknown
  • both: ukjent år
firsthalf
  • nb: første halvdel av $date1
  • nn: fyrste halvdelen av $date1
secondhalf
  • nb: andre halvdel av $date1
  • nn: andre halvdelen av $date1
1quarter
  • nb: første kvartal av $date1
  • nn: fyrste kvartalet av $date1
2quarter
  • nb: andre kvartal av $date1
  • nn: andre kvartalet av $date1
3quarter
  • nb: tredje kvartal av $date1
  • nn: tredje kvartalet av $date1
4quarter
  • nb: fjerde kvartal av $date1
  • nn: fjerde kvartalet av $date
spring
  • both: våren $date1
summer
  • nb: sommeren $date1
  • nn: sumaren $date1
autumn
  • nb: høsten $date1
  • nn: hausten $date1
winter
  • both: vinteren $date1
decade
  • nb: $date1-årene
  • nn: $date1-åra
century
nb and no: $date1. århundre
  • nn: det $date1. århundre
millennium
  • nb and no: $date1. årtusen
  • nn: $date. tusenår
million
  • nb: $date1 millioner år
  • nn: $date1 millionar år
billion
  • nb: $date1 milliarder år
  • nn: $date1 milliardar år
turn of the century
  • nb: function(date1, date2, state) return 'slutten av det ' .. Ordinal(date1, 'nb') .. ' århundre/begynnelsen av det ' .. Ordinal(date2, 'nb') .. ' århundre' end
  • nn: function(date1, date2, state) return 'slutten av det ' .. Ordinal(date1, 'nn') .. ' hundreåret/byrjinga av det ' .. Ordinal(date2, 'nn') .. ' hundreåret' end
turn of the decade
  • nb: sent på $date1-tallet og tidlig på $date2-tallet
  • nn: seint på $date1-talet og tidleg på $date2-talet
turn of the year
  • both: årsskiftet $date1/$date2
circa2
  • both: ca. mellom $date1 og $date2
julian
ad
  • both: $date1 e.Kr.
ah
bc
  • both: $date1 f.Kr.
bp
  • nb: $date1 BP
  • nn: $date1 BP

Jon Harald Søby (talk) 13:40, 30 July 2017 (UTC)[reply]

Are you sure about the abbreviations, Jon? At least with {{LangSwitch}} I would have to use no for Bokmal (sorry for leaving out the diacritics) and, yes, nn for Nynorsk. Also the Wikipedias have them – w:no: and w:nn:. In the moment here in this module nb and no are used, this may be the real issue. — Speravir – 22:23, 28 September 2017 (UTC)[reply]
@Speravir: Yes, absolutely 100 % sure. no should not be used, it's a macrocode that encompasses both nb and nn (however, it's totally fine to keep the no definitions in this module for backwards compatibility and whatnot, no harm done). The Wikipedia uses that code in the URL for historical reasons (and the code is used quite a lot here on Commons because of the Wikipedia's wrong use of that code). It's complicated. Jon Harald Søby (talk) 22:38, 28 September 2017 (UTC)[reply]
Jon, I accidently found that no is redirected to nb (Module:Fallbacklist). So, the issue here in this module ist that effectively Norsk Bokmal is given twice. My suggestion: To make it easier for an admin edit your request above into something like this (look into wikisource; I intentionally used <pre> and the existing indentation with tabs, the box is just for distinction):
* from-until
Change lang code no to nn
  • by
    Replace
		no='innen $date1',

with

		nn='innan $date1',

and so on. — Speravir – 23:14, 29 September 2017 (UTC)[reply]
@Speravir: What, change no to nn? That makes no sense. Jon Harald Søby (talk) 23:16, 29 September 2017 (UTC)[reply]
Oh, sorry, I see what you mean now. Replace the no instances with what I put in nn, and add in nb. I wasn't aware of that fallback module, so this should be fine. Jon Harald Søby (talk) 23:18, 29 September 2017 (UTC)[reply]
Phew! mm— Speravir – 23:23, 29 September 2017 (UTC)[reply]
✓ Done thanks a lot and sorry for not noticing it earlier. --Jarekt (talk) 13:23, 3 October 2017 (UTC)[reply]

Julian era produces spare space[edit]

en='$date1 ($date2 in [[w:Old Style and New Style dates|Julian calendar]])',

When Julian is used as the era parameter, there is no $date2. Then the space after $date2 shouldn't appear, e.g. in {{complex date|era=Julian|date1=1789-7-14}} -> 14 July 1789 ( in Julian calendar) Perhaps the concatenation of the dates can take place somewhere else in the code? Thanks a lot, --Marsupium (talk) 17:19, 18 August 2017 (UTC)[reply]

After reviewing the code for this module, I don't think this is necessarily a problem with Module:Complex date. I think the problem is that you are trying to use the {{Complex date}} template in a manner that is inconsistent with its documented behavior. According to the documentation at {{Complex date}}, "Julian" is not a valid value for the era parameter. However, It looks like "Julian" is permitted to be used as a value for the conj parameter, which requires the use of two dates. So {{complex date|Julian|1789-07-25|1789-07-14}} (which produces "25 July 1789 (14 July 1789 in Julian calendar)") would be a supported example of using "Julian". —RP88 (talk) 18:52, 18 August 2017 (UTC)[reply]
Good point! However, it isn't me who is trying. I encountered the problem on Creator:Gennadiy Ladyzhenskiy. Then there it seems to be Module:Wikidata date with:
						dateStr = formatDate(data.main.calendar, data.main, nulDate, lang)
The other single date cases 'from', 'until', 'after' and 'before' there are probably also affected. At least there are two possible places where the inconsistency could be resolved :) --Marsupium (talk) 03:09, 26 August 2017 (UTC)[reply]
Marsupium and RP88, thanks for pointing out this issue. I fixed the space issue in Module:Complex date. As for Module:Complex date / Module:Wikidata date interaction: the line 172 (see above) create call to Module:Complex date's _complex_date('julian', nul, date1, units1, era1, nul, '', nul, nul, lang, 1). 'Julian' parameter does not come through "era" field. In the past the only documented cases of {{Complex date}} for Julian parameter had 2 dates. My plan was to write something to automatically calculate Gregorian date based on Julian one but never got around to do it. Now I guess I created a single date version of Julian date, where the Julian date is outside of parenthesis as oppose to two date Julian date with Gregorian outside and Julian inside. It works (I think) in English and Polish. Does it work in other languages? --Jarekt (talk) 13:10, 28 August 2017 (UTC)[reply]
It looks fine in de, es, fr and it. Thanks for fixing it! --Marsupium (talk) 15:55, 28 August 2017 (UTC)[reply]

Error with link to the module[edit]

In File:The pond at Jupille, by Ivan Pavlovich Pokhitonov.jpg I see [//commons.wikimedia.org/w/index.php?title=Module:I18n/complex_date&action=edit circa 1907-circa 1913] in red. --Base (talk) 12:44, 19 August 2017 (UTC)[reply]

@Base: I switched my language setting to Ukranian and looked at that file, and I too see the "circa" in red. Looking at the code, what appears to be happening is that this module is using {{Please translate}} to indicate that while it does have a Ukranian translation for a date range (i.e. "між $date1 та $date2"), it doesn't currently have a Ukranian translation for what in English is "circa $date1". Do you have a suggested translation? As an example, Russian is currently using ru={'около $date1', case={'gen',''}} (the piece of code with "gen" in it indicating that the date uses genitive case). If you can suggest a Ukranian translation, I'll add try to add it to the module. —RP88 (talk) 20:55, 19 August 2017 (UTC)[reply]
RP88, Ukrainian translation would be uk={'близько $date1', case={'gen',''}},. Thanks in advance for adding it. It is no good that lack of translation causes a weird thing being shown though, it should just fall back to English :/ --Base (talk) 21:32, 19 August 2017 (UTC)[reply]
Excellent, thank you Base. The file now says "між близько 1907 та близько 1913". Is that correct? If it is not, the module also supports adding a different translation in the case where just inserting the "circa" translation string into the "between" translation string produces an ungrammatical result. Please let me know. —RP88 (talk) 21:40, 19 August 2017 (UTC)[reply]
Thank you, RP88. Well, it is not that it is wrong but it sounds awkward. In this case with "between", "приблизно" would be a better word for "circa" but then the date should be in instrumental case. It's not supported, is it? So it might be ok to leave it as it is. Alternatively "circa" can be used. @Piramidion and Ата: you might have better ideas. --Base (talk) 21:57, 19 August 2017 (UTC)[reply]
Instrumental case is supported Base, and is currently used in the Ukrainian implementation of between (which is currently using uk={'між $date1 та $date2', case={'ins','ins'}},. For the case of between two "circa" dates the code uses en='between circa $date1 and circa $date2', for English, but ru={'с около $date1 до, примерно, $date2', case={'gen','gen'}}, for Russian. Would something like uk={'між приблизно $date1 та приблизно $date2', case={'ins','ins'}}, be preferable, or do you think something more like the current Russian implementation is better for Ukrainian? —RP88 (talk) 22:14, 19 August 2017 (UTC)[reply]
It may sound awkward because in normal text contraction бл. can be used instead of близько, or even no such word at all since between already gives a dose of uncertainty to the phrase. Thus whatever you decide is ok to be a little awkward, in my opinion. --Ата (talk) 08:41, 20 August 2017 (UTC)[reply]

By the way, Base, I appreciate you working this through with me. If you have the time, it would be great if you would look at the examples at Template:Complex date (i.e. [1]) and let me know if you see any that need fixes for Ukrainian. Obviously missing is Ukrainian support for "until', "spring", "summer", "fall", "winter", and "year unknown". However, even the ones that are implemented should be fixed if they read awkwardly. Also, since you brought up instrumental caae, looking at Module:Date it appears it has a some special cases to correctly format month names in instrumental and locative case in Russian and few other languages but not Ukrainian. Have you noticed Commons not correctly formmating month names in Ukrainian? Examples:

  • {{#invoke:DateI18n|Date|year=1999|month=08|lang=ru|case=gen}} -> августа 1999
  • {{#invoke:DateI18n|Date|year=1999|month=08|lang=uk|case=gen}} -> серпня 1999
  • {{#invoke:DateI18n|Date|year=1999|month=09|lang=ru|case=ins}} -> сентябрём 1999
  • {{#invoke:DateI18n|Date|year=1999|month=09|lang=uk|case=ins}} -> вересень 1999

RP88 (talk) 22:45, 19 August 2017 (UTC)[reply]

I'll look into it a bit later, probably after Ukrainian Wikiconference which is this weekend. Instrumental case for Ukrainian is wrong in the examples you've given indeed. August is rendered in nominative case there. It is supposed to be серпнем in instrumental. --Base (talk) 23:54, 21 August 2017 (UTC)[reply]

English phrase 'between circa $date1 and circa $date2' is translated through option "circa2" Russian version is 'с около $date1 до, примерно, $date2' an Polish 'od około $date1 do około $date2'. Ukrainian is missing and fall back of combining 'between' and "Circa" options. For best result please provide Ukrainian version of "circa2", or any other phrase missing Ukrainian translation. --Jarekt (talk) 03:23, 23 August 2017 (UTC)[reply]

Spelling mistake in Spanish[edit]

{{Edit request}}

es='1ª mitad de $date1',

and

es='2ª mitad de $date1',

In Spanish, abbreviations in ordinals are used primarily in lists or names of important events (34.ª Sesión del Consejo de Derechos Humanos de las Naciones Unidas), not single sentences. Replace them with:

es='primera mitad de $date1',

and

es='segunda mitad de $date1',

Jarould [talk] 04:23, 11 February 2018 (UTC)[reply]

And add:
['by'] = {
⋮
es='para $date1',
['from'] = {
⋮
es='desde $date1',
['until'] = {
⋮
es='hasta $date1',
['turn of the decade'] = {
⋮
es='finales de los años $date1 y principios de los años $date2',
['turn of the century'] = {
⋮
es=function(date1, date2, state) return 'hacia finales del siglo ' .. Roman(date1) .. ' y principios del siglo ' .. Roman(date2) .. '' end,
['turn of the year'] = {
⋮
es='finales de $date1 y principios de $date2',
It would also be necessary to create a "local esOf" (like "local frOf"), because in the above syntaxes a specifier for the date format is required. For example:
{{complex date|before|2000-03}}: ✓  "antes de marzo de 2000"
{{complex date|before|2000-03-01}}:   "antes de 1 de marzo de 2000", ✓  "antes del 1 de marzo de 2000"
Parameters to be corrected: "before", "after", "by", "until", "circa". Similar problem:
{{complex date|1quarter|1815-09}}:   "primer cuarto del septiembre de 1815", ✓  "primer cuarto de septiembre de 1815", but
{{complex date|1quarter|99|era=BC}}: ✓  "primer cuarto del 99 a.C.". Output with era can use del.
We use a blank space in Spanish abbreviations of "BC" and "AD": a. C. (not a.C.) and d. C. (not d.C.) (more information):
['bc'] = {
⋮
es ='$date1 [[w:es:Antes de Cristo|a. C.]]',
['ad'] = {
⋮
es ='$date1 [[w:es:Anno Dómini|d. C.]]',
Also, mistranslations:
['spring'] = {
⋮
es='primavera de $date1',
['summer'] = {
⋮
es='verano de $date1',
['autumn'] = {
⋮
es='otoño de $date1',
['winter'] = {
⋮
es='invierno de $date1',
Jarould [talk] 20:52, 11 February 2018 (UTC)[reply]
I got most of them the part about "local esOf" was not clear. Maybe you could specify the table content and what to replace with what. or give me a lot of examples. Thanks for helping. --Jarekt (talk) 04:37, 14 February 2018 (UTC)[reply]
user:Jarould, I started to work on esOf see here. I got it to work in "before", "after", and quarter cases, but did not see "de" in "by", "until", "circa" phrases. Also it seems you use "del" for day-precision dates and "de" for month-precision. How about year, decade, millennium, etc? --Jarekt (talk) 11:47, 15 March 2018 (UTC)[reply]
@Jarekt: I have tried to show the issues in a table (I am not good at explaining these technical problems)... I based myself on this table:
{{{1}}} parameter Example code Spanish output
-
from-until
{{complex date|-|1999|2000}}
{{complex date|-|1999-01|2000-02}}
{{complex date|-|1999-01-01|2000-02-01}}
✓ de 1999 a 2000
✓ de enero de 1999 a febrero de 2000
 de 1 de enero de 1999 a 1 de febrero de 2000 (del 1 de febrero de 1999 al 1 de marzo de 2000)
between {{complex date|between|1999|2000}}
{{complex date|between|1999-02|2000-03}}
{{complex date|between|1999-02-01|2000-03-01}}
✓ entre 1999 y 2000
✓ entre febrero de 1999 y marzo de 2000
 entre 1 de febrero de 1999 y 1 de marzo de 2000 (entre el 1 de febrero de 1999 y el 1 de marzo de 2000)
~
ca
circa
{{complex date|~|1999|2000}}
{{complex date|ca|1999-05|2000-06}}
{{complex date|circa|1999-05-01|2000-06-1}}
✓ hacia 1999 o 2000
✓ hacia mayo de 1999 o junio de 2000
 hacia 1 de mayo de 1999 o 1 de junio de 2000 (hacia el 1 de febrero de 1999 o el 1 de marzo de 2000)
or {{complex date|or|1999|2000}}
{{complex date|or|1999-06|2000-07}}
{{complex date|or|1999-06-01|2000-07-1}}
✓ 1999 o 2000
✓ junio de 1999 o julio de 2000
✓ 1 de junio de 1999 o 1 de julio de 2000
and
&
{{complex date|&|1999|2000}}
{{complex date|and|1999-06|2000-07}}
{{complex date|and|1999-06-01|2000-07-01}}
✓ 1999 y 2000
✓ junio de 1999 y julio de 2000
✓ 1 de junio de 1999 y 1 de julio de 2000
Julian {{complex date|Julian|1865-01-19|1865-01-07}} ✓ 19 de enero de 1865 (7 de enero de 1865 según el calendario juliano)
Islamic {{complex date|islamic|1486|892}}
{{complex date|islamic|1486}}
1486 d. C. (892 A. H.)
1486 d. C. (892 A. H.)
(see note bellow)
era parameter {{complex date|or|985|986|era=BC}} ✓ 985 o 986 a. C.


{{{1}}} parameter Example code Spanish output Example code with era Spanish output with era
<
b
before
{{complex date|<|2000}}
{{complex date|b|2000-03}}
{{complex date|before|2000-03-01}}
✓ antes de 2000
✓ antes de marzo de 2000
 antes de 1 de marzo de 2000 (antes del 1 de marzo de 2000)
{{complex date|<|99|era=BC}}  antes de 99 a. C. (antes del 99 a. C.)
>
a
after
{{complex date|>|1999}}
{{complex date|a|1999-04}}
{{complex date|after|1999-04-01}}
✓ después de 1999
✓ después de abril de 1999
 después de 1 de abril de 1999 (después del 1 de abril de 1999)
{{complex date|>|99|era=BC}}  después de 99 a. C. (después del 99 a. C.)
by {{complex date|by|1999}}
{{complex date|by|1999-04}}
{{complex date|by|1999-04-01}}
✓ para 1999
✓ para abril de 1999
 para 1 de abril de 1999 (para el 1 de abril de 1999)
{{complex date|by|99|era=BC}}  para 99 a. C. (para el 99 a. C.)
from {{complex date|from|1999}}
{{complex date|from|1999-04}}
{{complex date|from|1999-04-01}}
✓ desde 1999
✓ desde abril de 1999
 desde 1 de abril de 1999 (desde el 1 de abril de 1999)
{{complex date|from|99|era=BC}}  desde 99 a. C. (desde el 99 a. C.)
until {{complex date|until|1999}}
{{complex date|until|1999-04}}
{{complex date|until|1999-04-01}}
✓ hasta 1999
✓ hasta abril de 1999
 hasta 1 de abril de 1999 (hasta el 1 de abril de 1999)
{{complex date|until|99|era=BC}}  hasta 99 a. C. (hasta el 99 a. C.)
~
ca
circa
{{complex date|~|1999}}
{{complex date|ca|1999-05}}
{{complex date|circa|1999-05-01}}
✓ hacia 1999
✓ hacia mayo de 1999
 hacia 1 de mayo de 1999 (hacia el 1 de mayo de 1999)
{{complex date|~|99|era=BC}}  hacia 99 a. C. (hacia el 99 a. C.)
s
decade
{{complex date|s|1960}}
{{complex date|decade|1800}}
✓ años 1960
✓ años 1800
{{complex date|s|960|era=BCE}} ✓ años 960 a. C.
century {{complex date|century|1}}
{{complex date|century|20}}
✓ siglo I
✓ siglo XX
{{complex date|century|1|era=BC}} ✓ siglo I a. C.
millennium {{complex date|millennium|1}} ✓ I milenio {{complex date|millennium|2|era=BC}} ✓ II milenio a. C.
turn of the decade {{complex date|turn of the decade|1920}}
{{complex date|turn of the decade|1800}}
✓ finales de los años 1910 y principios de los años 1920
✓ finales de los años 1790 y principios de los años 1800
{{complex date|turn of the decade|920|era=BC}} ✓ finales de los años 920 y principios de los años 910 a. C.
turn of the century {{complex date|turn of the century|2}}
{{complex date|turn of the century|20}}
✓ hacia finales del siglo I y principios del siglo II
✓ hacia finales del siglo XIX y principios del siglo XX
{{complex date|turn of the century|2|era=BC}} ✓ hacia finales del siglo II y principios del siglo I a. C.
turn of the year {{complex date|turn of the year|1992}} ✓ finales de 1991 y principios de 1992 {{complex date|turn of the year|922|era=BC}}  finales de 922 y principios de 921 a. C. (finales del 922 y principios del 921 a. C.)
spring {{complex date|spring|1999}} ✓ primavera de 1999 {{complex date|spring|99|era=AD}}  primavera de 99 d. C. (primavera del 99 d. C.)
summer {{complex date|summer|1999}} ✓ verano de 1999 {{complex date|summer|99|era=BC}}  verano de 99 a. C. (verano del 99 a. C.)
fall
autumn
{{complex date|fall|1999}}
{{complex date|autumn|1999}}
✓ otoño de 1999
✓ otoño de 1999
{{complex date|fall|99|era=AD}}  otoño de 99 d. C. (otoño del 99 d. C.)
winter {{complex date|winter|1999}} ✓ invierno de 1999 {{complex date|winter|99|era=BC}}  invierno de 99 a. C. (invierno del 99 a. C.)
beginning
early
{{complex date|early|1999-08}}
{{complex date|beginning|1999}}
✓ a principios de agosto de 1999
✓ a principios de 1999
{{complex date|early|99|era=BC}}  a principios de 99 a. C. (a principios del 99 a. C.)
mid
middle
{{complex date|mid|1999-10}}
{{complex date|middle|1999}}
✓ a mediados de octubre de 1999
✓ a mediados de 1999
{{complex date|mid|99|era=BC}}  a mediados de 99 a. C. (a mediados del 99 a. C.)
end
late
{{complex date|end|1999-11}}
{{complex date|late|1999}}
✓ a fines de noviembre de 1999
✓ a fines de 1999
{{complex date|end|99|era=BCE}}  a fines de 99 a. C. (a fines del 99 a. C.)
firsthalf
1half
1sthalf
first half
1st half
{{complex date|firsthalf|1999-11}}
{{complex date|1half|1999}}
✓ primera mitad de noviembre de 1999
✓ primera mitad de 1999
{{complex date|firsthalf|99|era=BC}}  primera mitad de 99 a. C. (primera mitad del 99 a. C.)
secondhalf
2half
2ndhalf
second half
2nd half
{{complex date|secondhalf|1999-11}}
{{complex date|2half|1999}}
✓ segunda mitad de noviembre de 1999
✓ segunda mitad de 1999
{{complex date|secondhalf|99|era=BCE}}  segunda mitad de 99 a. C. (segunda mitad del 99 a. C.)
1quarter
quarter1
1stquarter
1st quarter
{{complex date|1quarter|1815-09}}
{{complex date|1quarter|1815}}
 primer cuarto del septiembre de 1815 (primer cuarto de septiembre de 1815)
 primer cuarto del 1815 (primer cuarto de 1815)
{{complex date|1quarter|99|era=BC}} ✓ primer cuarto del 99 a. C.
2quarter
quarter2
2ndquarter
2nd quarter
{{complex date|2quarter|1815-09}}
{{complex date|2quarter|1815}}
 segundo cuarto del septiembre de 1815 (segundo cuarto de septiembre de 1815)
 segundo cuarto del 1815 (segundo cuarto de 1815)
{{complex date|2quarter|99|era=BC}} ✓ segundo cuarto del 99 a. C.
3quarter
quarter3
3rdquarter
3rd quarter
{{complex date|3quarter|1815-09}}
{{complex date|3quarter|1815}}
 tercer cuarto del septiembre de 1815 (tercer cuarto de septiembre de 1815)
 tercer cuarto del 1815 (primer cuarto de 1815)
{{complex date|3quarter|99|era=BC}} ✓ tercer cuarto del 99 a. C.
4quarter
quarter4
4thquarter
4th quarter
{{complex date|4quarter|1815-09}}
{{complex date|4quarter|1815}}
 último cuarto del septiembre de 1815 (último cuarto de septiembre de 1815)
 último cuarto del 1815 (último cuarto de 1815)
{{complex date|4quarter|99|era=BC}} ✓ último cuarto del 99 a. C.
BC
BCE
{{complex date|BC|44-03-15}}
{{complex date|BCE|44}}
✓ 15 de marzo de 44 a. C.
✓ 44 a. C.
AD
CE
{{complex date|AD|944-03}}
{{complex date|CE|944}}
✓ marzo de 944 d. C.
✓ 944 d. C.
?
unknown
{{complex date|?}}
{{complex date|unknown}}
✓ fecha desconocida
✓ fecha desconocida
{{complex date|?||era=BC}} ✓ fecha desconocida a. C.
year unknown {{complex date|year unknown}} ✓ año desconocido {{complex date|year unknown|era=BC}} ✓ año desconocido a. C.

Also, if possible, add a non-breaking space:

['bc'] = {
⋮
es ='$date1 [[w:es:Antes de Cristo|a.&nbsp;C.]]',
['ad'] = {
⋮
es ='$date1 [[w:es:Anno Dómini|d.&nbsp;C.]]',

... and, this causes problems in other languages:

['ah'] = {
⋮
en = '[[w:en:Hijri year|Hijri历]]$date1',

In Spanish, 1439 AH is translated as 1439 de la Hégira (an example); formerly was después de la Hégira. AH is a little used abbreviation in Spanish.

['ah'] = {
⋮
es = '$date1 de la [[:w:es:Calendario musulmán|Hégira]]',
Jarould [talk] 02:11, 28 June 2018 (UTC)[reply]

Esperanto translation[edit]

Here are the missing translations into Esperanto (eo):

    ['from-until']     de $date1 al $date2
    ['between']        inter $date1 kaj $date2
    ['or']             $date1 aŭ $date2
    ['and']            $date1 kaj $date2
    ['by']             ne post $date1
    ['before']         antaŭ $date1
    ['from']           ekde $date1
    ['until']          ĝis $date1
    ['after']          post $date1
    ['early']          komence de $date1
    ['mid']            meze de $date1
    ['late']           fine de $date1
    ['circa']          ĉirkaŭ $date1
    ['year unknown']   jaro nesciata
    ['firsthalf']      unua duono de $date1
    ['secondhalf']     dua duono de $date1
    ['1quarter']       unua kvarono de $date1
    ['2quarter']       dua kvarono de $date1
    ['3quarter']       tria kvarono de $date1
    ['4quarter']       kvara kvarono de $date1
    ['decade']         $date1-aj jaroj
    ['century']        $date1-a jarcento
    ['millennium']     $date1-a jarmilo
    ['million']        $date1 milionoj da jaroj
    ['turn of the century']    ŝanĝo de la $date1-a al la $date2-a jarcentoj
    ['turn of the decade']     ŝanĝo de la $date1-a al la $date2-a jardekoj
    ['turn of the year']       jarŝanĝo $date1 / $date2
    ['circa1']         proksimume de $date1 ĝis $date2
    ['julian']         $date1 ($date2 laŭ la [[w:eo:Julia kalendaro|Julia Kalendaro]])
    ['ad']             $date1 pK
    ['ah']             $date1 post la [[w:eo:Heĝiro|Heĝiro]]
    ['bc']             $date1 aK
    ['bp']             $date1 [[w:eo:Before Present|antaŭ 1950]]

If there's a more suitable form to present them I will gladly try to transform them. I do not have the privilege to make the changes myself.

-- Renardo la vulpo (talk) 20:35, 19 July 2018 (UTC)[reply]

✓ Done Renardo la vulpo thanks for providing those. Please check. I think your BP was wrong to I guessed. --Jarekt (talk) 17:21, 20 July 2018 (UTC)[reply]
Thanks for making the changes, @Jarekt. You are right, I had never heard or seen BP before (in any language), and as I found that it normally refers to the year 1950 I used that. A literal translation (antaŭ nun) would not make sense since the calculation no longer seems to refer to the “present.” So why not leave it like this until we find an expert. -- Renardo la vulpo (talk) 18:11, 20 July 2018 (UTC)[reply]

'zh vs. 'zh-hans' and 'zh-hant'[edit]

@Jarekt: You may have noticed that I changed the use of the 'zh' language code in this module. Despite what common sense might suggest, the code 'zh' is not currently handled as a common fallback for 'zh-hans' and 'zh-hant', it's actually processed as a specific variety of zh-hans. In particular, the fallback chains are

  • 'zh' -> 'zh-hans' -> 'en'
  • 'zh-hans' -> 'en'
  • 'zh-hant' -> 'zh-hans' -> 'en'

There is a nice picture of the fallback chains at File:MediaWiki_fallback_chains.svg, where you can see that 'zh-hans' and 'zh-hant' are mostly treated as two, related, but separate language groupings. I investigated why 'zh' isn't the fallback for both 'zh-hans' and 'zh-hant' (which would normally be the expected handling) and it appears to an be artifact specific to the MediaWiki software due to the evolution of the Chinese language Wikipedia sites (which apparently started out using just the 'zh' language code but containing mostly 'zh-hans' translations). I'm thinking about taking a look at some of the other i18n code and, where possible, replacing the use of 'zh' with either both 'zh-hans' and 'zh-hant', or moving the 'zh' translation to the 'zh-hans' code (if the translated text uses only the simplified Chinese characters, i.e. no traditional Chinese characters). Does this sound like a good idea to you? —RP88 (talk) 16:37, 18 August 2018 (UTC)[reply]

Yes, I think we could just replace "zh" with "zh-hans", but verifying that the characters are actually simplified Chinese characters sounds like the right way to do it. --Jarekt (talk) 16:41, 18 August 2018 (UTC)[reply]
OK, I've updated the 'i18n' subpages that appear to be in use. I also tracked down when the behavior changed (since I recalled that 'zh' used to work as the common translation for 'zh-hans' and 'zh-hant'). About a year ago at Special:Diff/258015856 you changed LangSwitch to use the MediaWiki fallback chain instead of the Commons-specific fallback chain at Module:Fallbacklist. the Commons-specifc fallback chain was using 'zh' as the fallback for both 'zh-hans' and 'zh-hant' while the MediaWiki fallback chain does not (for the historical reasons I mentioned above). —RP88 (talk) 18:44, 18 August 2018 (UTC)[reply]
@Jarekt: This is a general problem of existing Module:Fallback which just uses the very basic (and in fact broken!) fallbacks of Mediawiki, which is definitely not BC P47 conforming. I discussed that problem already in that module, but the changes (tested and approved since long by many users) are still pending their application (see Module:Fallback/sandbox which is now used for some other modules needing these changes, notably for many translations: this module fixes the very deficient and incoherent MediaWiki builtin fallbacks, and implements the missing "default" pseudo-language correctly, which is also mostly equivalent to CLDR "root" locale, but which is needed to detect also missing translations where English is used as a fallback that must be tracked; with the "default" we can track them, or mark them with additional markup, while setting "en" separately and silently for English and as a valid fallback for English variants like "en-us", "en-ca", "en-gb"). The alternative would be that MediaWiki fixes its own builtin fallbacks (to be BCP47 conforming), but its is still missing a lot of needed fallbacks for languages already used since long in Commons. verdy_p (talk) 12:54, 21 June 2019 (UTC)[reply]
About a year ago we spun off Module:LangSwitch and Module:Autotranslate from Module:Fallback, so that changes to one function do not trigger refresh of all the pages using the other. If there are issues with the current "default" option can you set up test cases in Module:LangSwitch/sandbox/testcases that demonstrate what happens currently and what you think should happen (and why). Behavior of "default" option changed a few times since we first introduced it, and I am weary of unintended consequences on pages currently using it. As for fallback, I think we should fallow principle that software should not have surprising consequences, and having multiple alternative fallback chains used by different tools on Commons, would introduce unpredictability to the behavior of those tools. I personally have no opinion about which language should fall back to which, but it must be consistent between templates using mw:Extension:Translate, translations pulled from MediaWiki namespace using {{#int:...}} parser function or templates using {{LangSwitch}} or {{Autotranslate}}. If there are issues with current fallback chain, than they should be discussed at phabricator pages. That is the only way all those tools will be updated at the same time. --Jarekt (talk) 15:05, 21 June 2019 (UTC)[reply]

Error in French version[edit]

The date field of File:Ploughman Louvre F77.jpg returns an error in French. It works fine in English.Zolo (talk) 18:38, 21 October 2018 (UTC)[reply]

Update Malayalam[edit]

{{Editprotect}} Please include these Malayalam translations:

['until'] = { ml= '$date1 വരെ',}

['circa'] = { ml= 'ഉദ്ദേശം $date1',}

probably = { ml= 'ഒരുപക്ഷേ $date1',}

possibly = { ml = 'മിക്കവാറും $date1',}

presumably = { ml = 'ഊഹപ്രകാരം $date1', }

['1quarter']= { ml='$date1 ഒന്നാം ത്രൈമാസം',}

['2quarter']= { ml='$date1 രണ്ടാം ത്രൈമാസം',}

['3quarter']= { ml='$date1 മൂന്നാം ത്രൈമാസം',}

['4quarter']= { ml='$date1 നാലാം ത്രൈമാസം',}

['millennium'] = { ml='date1-മത്തെ സഹസ്രാബ്ദം',}

['turn of the century'] = { ml='$date1 നൂറ്റാണ്ട് അവസാനവും $date2 നൂറ്റാണ്ട് ആദ്യവും' }

['turn of the decade']={ ml='$date1കൾ അവസാനവും $date2കൾ ആദ്യവും',}

['turn of the year']={ ml='$date1 അവസാനവും $date2 ആദ്യവും',}

['circa2'] = { ml='ഉദ്ദേശം $date1-നും ഉദ്ദേശം $date2-നും ഇടയ്ക്ക്',}

['julian'] = { ml='$date1 ([[w:ml:ജൂലിയൻ കാലഗണനാരീതി|ജൂലിയൻ വർഷത്തിൽ]] $date2)',

['ah'] = {ml ='$date1 [[w:ml:ഇസ്‌ലാമിക കലണ്ടർ|ഹിജ്റ]]',}

To mark 'million' years, it would be ideal to multiply the years with 10 and call it as ലക്ഷം വർഷങ്ങൾ, since ലക്ഷം is more natural and common to perceive in Malayalam. (ലക്ഷം = Lakh in Hindi & Indian English = Hundred thousand)
['million'] = { ml = '$date1*10 ലക്ഷം വർഷങ്ങൾ', }

Similarly to mark 'billion' years, multiplying the years with 10 and call it as കോടി വർഷങ്ങൾ (കോടി = Crore = 10 million) would be ideal.
['billion'] = { ml = '$date1*10 കോടി വർഷങ്ങൾ', }
If it is possible to implement, kindly note that 100+ ലക്ഷം (=10+ million) is also awkward. Since it is 1+ കോടി (Crore).

Advance thanks--Praveen:talk 16:03, 8 December 2018 (UTC)[reply]

✓ Done but please test new functions --Jarekt (talk) 05:03, 9 December 2018 (UTC)[reply]
@Jarekt: Thank you for updating Malayalam translations. My suggestion for "millennium" was missing the "$" symbol, could you update it as:
['millennium'] = { ml='$date1-മത്തെ സഹസ്രാബ്ദം',}
I am unable to find the actual template which use million and billion. I tried to use it with {{Other date}} here. It didn't give any errors, but output was not as defined also.
Since 100 ലക്ഷം is 1 കോടി (10 million = 100 lakh = 1 crore), could you update 'million' to implement that too? Something similar to this:
['million'] = {
		ml=function(date1, state)
			if date1 >= 10 then 
				return (date1 / 10) .. '  കോടി വർഷങ്ങൾ'  -- 100 lakh = 1 crore
			else 
				 return (date1 * 10) .. ' ലക്ഷം വർഷങ്ങൾ'
			end
		end,
},
--Praveen:talk 14:42, 9 December 2018 (UTC)[reply]
Praveen, ✓ Done --Jarekt (talk) 02:52, 10 December 2018 (UTC)[reply]
Thank you--Praveen:talk 06:37, 10 December 2018 (UTC)[reply]

Catalan misspelling[edit]

{{Edit protected}} Please, fix Catalan desprès to després de:

	['after'] = {
		...
		ca='després de $date1',

--V.Riullop (talk) 15:24, 14 January 2019 (UTC)[reply]

✓ Done --Jarekt (talk) 17:39, 14 January 2019 (UTC)[reply]

uk translation[edit]

{{Edit request}} Please add:

probably = {
 uk = 'ймовірно $date1',

possibly = {
 uk = 'можливо $date1',

presumably = {
 uk = 'здогадно $date1',

--Renamerr (talk) 14:21, 14 February 2019 (UTC)[reply]

✓ Done Thank you! 4nn1l2 (talk) 14:28, 14 February 2019 (UTC)[reply]

problem in French with "circa" dates[edit]

Hi Jarekt,

When viewing an artwork wich item on wikidata has : P1480:Q5727902, instead of "circa xxxx" I get "Date Module:I18n/complex_date:700: attempt to compare number with nil"

see https://imgur.com/VTirMRq and for a file with the problem File:Nature_morte,_poire_et_pommes_vertes.JPG

Nota : I use fr interface - I tested on en interface, and the display is fine in English.

Thanks for your help on this. --Hsarrazin (talk) 23:15, 2 June 2019 (UTC)[reply]

You can reproduce it by {{#invoke:Wikidata date|date|item=Q5600|property=P569|lang=fr}} -> "vers ". I will see how to fix it. --Jarekt (talk) 03:07, 3 June 2019 (UTC)[reply]
Thanks ! --Hsarrazin (talk) 18:20, 4 June 2019 (UTC)[reply]
Fixed, Hsarrazin could you verify? --Jarekt (talk) 02:56, 8 June 2019 (UTC)[reply]
 Thank you. Jarekt :) --Hsarrazin (talk) 08:13, 8 June 2019 (UTC)[reply]

Variable "between" forms for French (possibly other languages)[edit]

@Jarekt: The current value given for "between" in French is not correct, it should be:

between = { ...
  fr = function(date1, date2, state)
      return state.precision > 10 and 'entre le $date1 et le $date2'
        or 'entre $date1 et $date2'
    end,
 ... }

and not:

between = { ...
  fr = 'entre $date1 et $date2',
... }

to return "entre le 1er janvier et le 31 décembre", but not "entre 1er janvier et 31 décembre".

There's a mandatory "le" article before the day number (in the month), when using the "entre" preposition and the "et" conjonction (this is implied when using the prepositions "du" and "au" which are the mandatory contractions of "de le" and "à le", used with the "from-until" form).

Notes:

  • when lower precision items (month or year) are specified in both dates after the first distinguishing item (day or month), but they are equal, they are preferably factorized:
    • "entre le 15 et le 31 janvier", prefered to "entre le 15 janvier et le 31 janvier"
    • "entre le 15 et le 31 janvier 2019", prefered to "entre le 15 janvier 2019 et le 31 janvier 2019"
    • "entre le 15 janvier et le 31 décembre 2019", prefered to "entre le 15 janvier 2019 et le 31 décembre 2019"
  • if the precision is days of week without more precision, there's preferably no article before the weekday:
    • "entre lundi et mardi", preferable to "entre le lundi et le mardi" (not incorrect but very uncommon and perceived as unnecessarily verbose because such weekdays are indefinite)
    • but "entre le lundi 15 et le mardi 16", is still preferable to "entre lundi 15 et mardi 16" (these weekdays are definite by the added precision)
    • but "entre le lundi 15 janvier et le mardi 16 janvier", is still preferable to "entre lundi 15 janvier et mardi 16 janvier" (same remark)
  • "between" or "from-until" are also synonymous when there's a day number (in the month) or weekday or month, the value could be the same function used for "from-until" (using "du $date1 au $date2" with a day number, or 'de $date1 à $date2' with just a year), except when there's a month name but no day number (because of the contraction of "de" into "d'" for some months starting by a vowel: "avril", "août", "octobre") and this could simplify tests.
  • if the precision is in hours, there's no article: "entre 15h30 et 23h", but not "entre le 15h30 et le 23h" (always incorrect)
  • the insertion of "le" article is then dependant of the first item in each date, separately: if both dates do not specify the same precision, the insertion is conditional so we get "entre le 15 janvier et décembre", but not "entre le 15 janvier et le décembre", and not "entre 15 janvier et décembre"

For now the functions do not allow testing very simply which subfields are included (separately) in $date1 and $date2, we just have a single "precision", assumed (incorrectly) to be the same for both, and not giving details in the state variable for other included fields (frequently $date1 will have some fields dropped, present only in $date2 which adds common precision for both dates; the module still does not allow such contraction of intervals, because it uses the same format and precision for both dates: see CLDR data for more details about date intervals, because there are similar rules for other languages, including English).

Thanks. verdy_p (talk) 11:47, 21 June 2019 (UTC)[reply]

verdy_p, I added your fixes, although I opted for easier to read format. Current Lua code was written to replace old {{Other date}} template and correct some of the errors caused by template nesting, many users were using. There were minor fixes here and there, but in most simple cases the lua code mimics the old template. The old code did not create phases like "entre le 15 et le 31 janvier", probably due to complexity, especially if you try to create phrases like "between end of 1980s and winter of 1999". I think it might be possible to switch to your "factorized" format but it would greatly complicate already complicated code. The "state" variable should have all the data provided or needed to create a date. Fields state.adj, state.era, state.units, state.precision are set to state.adj1, state.era1, state.units1, state.precision1, but state.adj1, state.era1, state.units1, state.precision1 are also provided. --Jarekt (talk) 20:01, 5 July 2019 (UTC)[reply]

Decades formatting for Hungarian[edit]

Please change the decade formatting of Hungarian to the following to properly support the different suffixes of the numbers:

hu = function(date1, state)
	local suffix = 's'
	if date1 % 100 == 10 or date1 % 100 == 40 or date1 % 100 == 50 or date1 % 100 == 70 or date1 % 100 == 90 then
		suffix = 'es'
	elseif date1 % 100 == 20 or date1 % 100 == 30 or date1 % 100 == 60 or date1 % 100 == 80 then
		suffix = 'as'
	elseif date1 % 100 == 0 then
		if date1 % 1000 ~= 0 then
			suffix = 'as'
		elseif date1 % 1e6 ~= 0 then
			suffix = 'es'
		end
	end
	return string.format('%d-%s évek', date1, suffix)
end

Thanks in advance! —Tacsipacsi (talk) 19:48, 4 July 2019 (UTC)[reply]

Tacsipacsi, ✓ Done. I simplified the code a bit. Please verify that it works OK. --Jarekt (talk) 19:34, 5 July 2019 (UTC)[reply]
@Jarekt: Not quite, see https://commons.wikimedia.org/wiki/File:KolonitsIlona1960s.jpg?uselang=hu. . Also, I wrote my code to be absolutely safe, so it will return something even for 1234 (not start of a decade), while your code, even if corrected to local suffix = LOCdecade[(date1 % 100)/10], will fail (the same bad argument #3 to 'format' (string expected, got nil). Lua error as currently visible on the above-linked page currently). By the way, I don’t know how you got “as” for 0 in the table. First, Lua uses 1-based arrays, so the text with 0 above is actually LOCdecade[1]. Second, there’s nothing like it in my code, because such thing simply doesn’t exist. If the date is the first decade of a century, we pronounce only the hundreds:
  • 1910s – “1910-es évek” – “ezerkilencszáztizes évek”
  • 1900s – “1900-as évek” – “ezerkilencszázas évek”
  • 2010s – “2010-es évek” – “kétezertizes évek”
  • 2000s – “2000-es évek” – “kétezres évek”
This is why these dates are handled with additional ifs; putting it into the array is simple waste of resources. —Tacsipacsi (talk) 20:58, 5 July 2019 (UTC)[reply]
Tacsipacsi, I added your version. Sorry for wasting your time reviewing my "improvements". --Jarekt (talk) 12:42, 6 July 2019 (UTC)[reply]
@Jarekt: No problem. By the way, using a table was really an improvement, it improved legibility, just it would have needed more careful handling. (And this time I got your ping, thanks.)Tacsipacsi (talk) 20:52, 6 July 2019 (UTC)[reply]

CKB translation[edit]

Hello, Please someone copy this and paste to the module (ckb translation is available now). Thanks! Aram (talk) 13:24, 28 July 2019 (UTC)[reply]

✓ Done. Please use the latest module code next time, and don’t remove any module calls to non-existent modules, or it’s not faster for me than simply copying all translations pasted to this page, as the versions have to be merged manually. —Tacsipacsi (talk) 17:15, 28 July 2019 (UTC)[reply]
Tacsipacsi i am so sorry to tired you! I am copied the source code from English Wikipedia And i did that on Wikidata , But i don't know which project is original for this module? Thanks! Aram (talk) 17:45, 28 July 2019 (UTC)[reply]
@Tacsipacsi: Aram (talk) 07:14, 29 July 2019 (UTC)[reply]
@Aram: I’ve almost replied, but I became too upset because your urge. I noticed it for the first time, just hadn’t time to respond for 14.5 hours, including a night. So: the master version is this one, see Wikidata. —Tacsipacsi (talk) 17:54, 4 September 2019 (UTC)[reply]

bugfix proposal for between-fr:[edit]

{{Editprotect}}

Hi there, it seems that the code between lines 190-194 has a bug, instead of:

			if state.precision > 10 then -- precision > month
				return 'entre $date1 et $date2'
			else				
				return 'entre le $date1 et le $date2'
			end

we should have (at least, may be something more complex to match the test cases below):

			if state.precision > 10 then -- precision > month
				return 'entre le $date1 et le $date2'
			else				
				return 'entre $date1 et $date2'
			end

Thank you, best regards, -- AlNo (discuter/talk/hablar/falar) 20:38, 4 August 2019 (UTC)[reply]

Here are some test cases:
wikicode renders as should be
{{between|1789|1799}} entre 1789 et 1799
date QS:P,+1750-00-00T00:00:00Z/7,P1319,+1789-00-00T00:00:00Z/9,P1326,+1799-00-00T00:00:00Z/9
entre 1789 et 1799
{{between|1789-02|1799-12}} entre février 1789 et décembre 1799
date QS:P,+1750-00-00T00:00:00Z/7,P1319,+1789-02-00T00:00:00Z/10,P1326,+1799-12-00T00:00:00Z/10
entre février 1789 et décembre 1799
{{between|1789-02-01|1799-12-15}} entre le 1er février 1789 et le 15 décembre 1799
date QS:P,+1750-00-00T00:00:00Z/7,P1319,+1789-02-01T00:00:00Z/11,P1326,+1799-12-15T00:00:00Z/11
entre le 1er février 1789 et le 15 décembre 1799
{{between|1789-02-01 09:30|1799-12-15 22:00}} entre le 1er février 1789, 09:30 et le 15 décembre 1799, 22:00 entre le 1er février 1789, 09:00 et le 15 décembre 1799, 22:00
{{between|18:00|19:00}} entre 18:00 et 19:00 entre 18:00 et 19:00
Best regards, -- AlNo (discuter/talk/hablar/falar) 09:45, 5 August 2019 (UTC)[reply]
An admin to make that change, please? Ayack (talk) 09:38, 25 January 2021 (UTC)

@Alno and Ayack: The precision of the dates isn’t necessarily the same, did I guess correctly how differing precision should appear?

wikicode renders as should be
{{other date|between|1789-02|1799-12-15}} entre février 1789 et le 15 décembre 1799
date QS:P,+1750-00-00T00:00:00Z/7,P1319,+1789-02-00T00:00:00Z/10,P1326,+1799-12-15T00:00:00Z/11
entre février 1789 et le 15 décembre 1799
{{other date|between|1789-02-01|1799-12}} entre le 1er février 1789 et décembre 1799
date QS:P,+1750-00-00T00:00:00Z/7,P1319,+1789-02-01T00:00:00Z/11,P1326,+1799-12-00T00:00:00Z/10
entre le 1er février 1789 et décembre 1799

Also, please note that the last (time-only) example above is unsupported, so any correct or incorrect result is only accidental—this module localizes absolute dates and times, so if the time is given, the year, month and day should be given as well. (In addition, in the date-and-time example the time was missing in the actual module call, which I’ve added now so that we see what really happens.) If I’m right with my two examples, I think the following code will produce the right result:

		fr = function(date1, date2, state)
			-- prepend ‘le’ if precision > month
			local prep1 = state.precision1 > 10 and 'le ' or ''
			local prep2 = state.precision2 > 10 and 'le ' or ''
			return 'entre ' .. prep1 .. '$date1 et ' .. prep2 .. '$date2'
		end,

Tacsipacsi (talk) 17:36, 26 January 2021 (UTC)[reply]

@Tacsipacsi: Yes, both examples are right. Thanks! Ayack (talk) 18:17, 26 January 2021 (UTC)[reply]
@Ayack: Done. (P.S. Please update your signature in your preferences to include at least one link to your Commons user, talk or contributions page. Your ping didn’t work because of the lack of the link, and your signature will be entirely disabled and reset to the default soon unless and until you include the link.) —Tacsipacsi (talk) 22:50, 26 January 2021 (UTC)[reply]
@Tacsipacsi: Thank you, it's OK now (and I've reset my signature). Ayack (talk) 08:48, 27 January 2021 (UTC)[reply]

Bug: Dutch language nl uses "kwartaal" or "week" instead of "kwart"[edit]

Dear all,

A curator of a Dutch museum complained to me about Template:Other_date, which uses from Complex_date.
Now i find just a small linguistic bug. In Dutch you can't say "kwart" in a date, but "kwartaal" or "week" (same word as in English).
So the example {{other date|1quarter|1815}} should be rendered in Dutch as "eerste kwartaal van 1815" etc.
But {{other date|1quarter|1815-09}} might be translated as week, so "eerste week van september 1815" Not! "kwartaal" or "kwart" here, "kwartaal" is used only for years, and you wouldn't say "eerste kwart van september" in Dutch.
So nquarter|year => (Dutch) (eerste/tweede/derde/vierde) kwartaal van (year)
and nquarter|year-month => (Dutch) (eerste/tweede/derde/vierde) week van (month year).
Too subtle? I am not allowed to correct this myself as far as i can see, so could someone else do this?
Thank you! Hansmuller (talk) 14:22, 6 October 2019 (UTC)[reply]

@Hansmuller: sorry I missed you note. Let me see if I can fix it. --Jarekt (talk) 02:27, 27 January 2021 (UTC)[reply]
Hansmuller, we could use the code below. What is the correct form for decade, century, and millenia?
		nl={function(date1, state) 			
			if state.precision == 10 then -- precision == month
				return 'eerst week van $date1'
			else
				return 'eerst kwartaal van $date1'
			end
		end
--Jarekt (talk) 02:47, 27 January 2021 (UTC)[reply]

Corrections to nn[edit]

Hello, here are a few mistakes I've noticed in the nn translations:

		nn='fra $date1 til $date2',
should be
		nn='frå $date1 til $date2',

		nn=function(date1, state) return 'det ' .. Ordinal(date1, 'no') .. ' århundre' end,
should be
		nn=function(date1, state) return 'det ' .. Ordinal(date1, 'no') .. ' hundreåret' end,

		nn=function(date1, state) return Ordinal(date1, 'no') .. ' tusenår' end,
should be
		nn=function(date1, state) return Ordinal(date1, 'no') .. ' tusenåret' end,
		
		nn='$date1 ($date2 etter [[w:no:Juliansk kalender|den julianske kalenderen]])',
should be
		nn='$date1 ($date2 etter [[w:nn:den julianske kalenderen|den julianske kalenderen]])',

Many thanks in advance for fixing them! --Ranveig (talk) 08:34, 2 March 2021 (UTC)[reply]

@NguoiDungKhongDinhDanh: , @Jarekt: , @Marsupium: , or anyone with the power to fix this. I have come across this error again, in the description of this image, both here and on Wikidataa. I don't know if fixing this file will sort out the error everywhere, but it would at least get rid of the error once. -- Ranveig (talk) 18:40, 23 July 2022 (UTC)[reply]
@Ranveig: ✓ Done NguoiDungKhongDinhDanh 15:44, 24 July 2022 (UTC)[reply]
Thank you so much! Ranveig (talk) 16:24, 24 July 2022 (UTC)[reply]

Corrections to zh-hant[edit]

Should be ['zh-hant']='$date1前後', instead of ['zh-hant']='$date1前后', Kanashimi (talk) 21:39, 14 September 2021 (UTC)[reply]

"Until": Russian localization[edit]

Please change Russian localization of "until" to "не позже". In Russian it will be less ambiguous than the current localization. According to discussion, there is no claims against the suggestion.--Yellow Horror (talk) 10:21, 17 December 2021 (UTC)[reply]

✓ Done @Yellow Horror: I don't speak Russian, so please re-check to see if I made a mistake. NguoiDungKhongDinhDanh 16:32, 18 December 2021 (UTC)[reply]

Portuguse translation[edit]

{{Edit request}} Please add the following translations:

['from'] = {
		pt='desde $date1',
['until'] = {
		pt='até $date1',
presumably = { -- see Q18122778
		pt = 'presumivelmente $date1',
['year unknown']= {
		pt='ano desconhecido',
['1quarter']= {
		pt='primeiro trimestre de $date1',
['2quarter']= {
		pt='segundo trimestre de $date1',
['3quarter']= {
		pt='terceiro trimestre de $date1',
['4quarter']= {
		pt='quarto trimestre de $date1',
['turn of the century'] = { 
		pt=function(date1, date2, state) return 'final do século ' .. Roman(date1) .. ' e início do século ' .. Roman(date2) .. '' end,
['turn of the decade']={
		pt='final dos anos $date1 e início dos anos $date2',
['turn of the year']={
		pt='final de $date1 e início de $date2',
['ad'] = {
		pt ='$date1 [[:pt:Anno Domini|AD]]',
['ah'] = {
		pt ='$date1 [[:pt:Ano da Hégira|AH]]',
['bc'] = {
		pt ='$date1 [[w:en:Ante Christum Natum|a.C.]]',

Fúlviodiz!-fiz! 22:04, 29 January 2023 (UTC)[reply]

✓ Done in Special:Diff/731076154. --TKsdik8900 (talk) 01:37, 9 February 2023 (UTC)[reply]

zh-hant corrections[edit]

{{Edit request}} I found the following errors in zh-hant:

  • by: should read “$date1前後”(后 is AFAIK acceptable in zh-tw, but not acceptable in zh-hk)
  • million: should read “$date1百萬年”
  • ah: should read “[[w:zh:伊斯蘭曆|伊斯蘭曆]]$date1”

The last one has a corresponding error in zh-hans, where the zh-hans string should read “[[w:zh:伊斯兰历|伊斯兰历]]$date1” (the two ah strings link to the same article) — Al12si (talk) 00:47, 15 February 2023 (UTC)[reply]

✓ Done --Lucas Werkmeister (talk) 12:12, 16 February 2023 (UTC)[reply]

Non-gregorian months[edit]

Please see Module talk:Complex date#Islamic months. --HyperGaruda (talk) 07:30, 18 February 2023 (UTC)[reply]

Irish language (ga) localization[edit]

It is requested that an edit or modification be made to this protected page.
Administrators/template editors: Please apply <nowiki> or {{Tl}} to the tag after the request is fulfilled.

Drhyme

Hi admins,

Can someone possibly update the module with deltas from w:ga:Module:I18n/complex date, please? It should be a copy/paste from the version as of 16/3/2023. Thanks! - Alison 20:34, 16 March 2023 (UTC)[reply]

ko translation[edit]

{{Edit request}}

['from-until'] = { ...
 ko = '$date1부터 $date2까지',
...
}

['between'] = { ...
 ko = '$date1에서 $date2 사이',
...
}

['or'] = { ...
 ko = '$date1 또는 $date2까지',
...
}

['and'] = { ...
 ko = '$date1 및 $date2',
...
}

['by'] = { ...
 ko = '$date1까지',
...
}

['before'] = { ...
 ko = '$date1 전',
...
}

['from'] = { ...
 ko = '$date1부터',
...
}

['until'] = { ...
 ko = '$date1까지',
...
}

['after'] = { ...
 ko = '$date1 후',
...
}

['early'] = { ...
 ko = '$date1 초반',
...
}

['mid'] = { ...
 ko = '$date1 중반',
...
}

['late'] = { ...
 ko = '$date1 후반',
...
}

['year unknown'] = { ...
 ko = '연도를 알 수 없음',
...
}

['firsthalf'] = { ...
 ko = '$date1 상반기',
...
}

['secondhalf'] = { ...
 ko = '$date1 하반기',
...
}

['1quarter'] = { ...
 ko = '$date1 1사분기',
...
}

['2quarter'] = { ...
 ko = '$date1 2사분기',
...
}

['3quarter'] = { ...
 ko = '$date1 3사분기',
...
}

['4quarter'] = { ...
 ko = '$date1 4사분기',
...
}

['spring'] = { ...
 ko = '{{#if:$date1|$date1년}} 봄',
...
}

['summer'] = { ...
 ko = '{{#if:$date1|$date1년}} 여름',
...
}

['autumn'] = { ...
 ko = '{{#if:$date1|$date1년}} 가을',
...
}

['winter'] = { ...
 ko = '{{#if:$date1|$date1년}} 겨울',
...
}

['decade'] = { ...
 ko = '$date1년대',
...
}

['century'] = { ...
 ko = '$date1세기',
...
}

['millennium'] = { ...
 ko = '$date천 년',
...
}

['million'] = { ...
 ko = '$date1백만 년',
...
}

['billion'] = { ...
 ko = '$date1십억 년',
...
}

['turn of the century'] = { ...
 ko = function(date1, date2, state) return '$date1세기 말' .. Ordinal(date2, 'ko') ..'세기 초' end,
...
}

['turn of the decade'] = { ...
 ko = '$date1년대 말 $date2년대 초',
...
}

['turn of the year'] = { ...
 ko = '$date1년에서 $date2년 초',
...
}

['circa2'] = { ...
 ko = '$date1경에서 $date2경 사이',
...
}

['julian'] = { ...
 ko = '$date1 ([[w:ko:율리우스력|율리우스력]] $date2)',
...
}

['ad'] = { ...
 ko = '서기 $date1',
...
}

['ah'] = { ...
 ko = '히즈리력 $date1',
...
}

['bc'] = { ...
 ko = '[[w:ko:서력기원|기원전]] $date1',
...
}

Drhyme (talk) 00:53, 20 July 2023 (UTC)[reply]