Vorlage:GetJD
Erscheinungsbild
Diese Vorlage konvertiert ein Datum in ein Julianisches Datum. Vorgabe ist das aktuelle Datum.
Eingabe:
- Parameter: Jahr (optional)
- Parameter: Monat (optional)
- Parameter: Tag (optional)
- Parameter: Stunde (optional)
- Parameter: Minute (optional)
- Parameter: Sekunde (optional)
Für Daten bis zum 4. Oktober 1582 wird automatisch der julianische ({{{{#if:|subst:}}{{#if:
|JULIANDAY.JULIAN
|{{#ifeq:J
|:
|:JULIANDAY.JULIAN
|{{#switch:
|=JULIANDAY.JULIAN
|#default=JULIANDAY.JULIAN}}}}}}{{#ifeq:x|{{{2}}}|{{#if:|
}}|{{{2}}}}}{{#ifeq:x|{{{3}}}|{{#if:|
}}|{{{3}}}}}{{#ifeq:x|{{{4}}}|{{#if:|
}}|{{{4}}}}}{{#ifeq:x|{{{5}}}|{{#if:|
}}|{{{5}}}}}{{#ifeq:x|{{{6}}}|{{#if:|
}}|{{{6}}}}}{{#ifeq:x|{{{7}}}|{{#if:|
}}|{{{7}}}}}{{#ifeq:x|{{{8}}}|{{#if:|
}}|{{{8}}}}}{{#ifeq:x|{{{9}}}|{{#if:|
}}|{{{9}}}}}{{#ifeq:x|{{{10}}}|{{#if:|
}}|{{{10}}}}}{{#ifeq:x|{{{11}}}|{{#if:|
}}|…}}{{#if:|
}}}}{{#if: | (Anzahl der Einbindungen)|}}) und ab dem 15. Oktober 1582 der Gregorianische Kalender ({{{{#if:|subst:}}{{#if:
|JULIANDAY
|{{#ifeq:J
|:
|:JULIANDAY
|{{#switch:
|=JULIANDAY
|#default=JULIANDAY}}}}}}{{#ifeq:x|{{{2}}}|{{#if:|
}}|{{{2}}}}}{{#ifeq:x|{{{3}}}|{{#if:|
}}|{{{3}}}}}{{#ifeq:x|{{{4}}}|{{#if:|
}}|{{{4}}}}}{{#ifeq:x|{{{5}}}|{{#if:|
}}|{{{5}}}}}{{#ifeq:x|{{{6}}}|{{#if:|
}}|{{{6}}}}}{{#ifeq:x|{{{7}}}|{{#if:|
}}|{{{7}}}}}{{#ifeq:x|{{{8}}}|{{#if:|
}}|{{{8}}}}}{{#ifeq:x|{{{9}}}|{{#if:|
}}|{{{9}}}}}{{#ifeq:x|{{{10}}}|{{#if:|
}}|{{{10}}}}}{{#ifeq:x|{{{11}}}|{{#if:|
}}|…}}{{#if:|
}}}}{{#if: | (Anzahl der Einbindungen)|}}) genutzt.
Beispiel:
{{GetJD|1582|10|4}}= {{#if:1582|{{#ifexpr:((1582)*12+(10)round 0)>18994 or((1582)*12+(10)round 0)=18994 and(4)+(12)/24+(0)/1440+(0)/86400>=15.5|{{#if:1582|{{#expr:((((1582)*12+(10)+57608.5 round 0)/12-1.5 round 0)*1461/4-0.5 round 0)-((((1582)*12+(10)+57608.5 round 0)/12-1.5 round 0)/100-0.5 round 0)+((((1582)*12+(10)+57608.5 round 0)/12-1.5 round 0)/400-0.5 round 0)+((((10)+57608.5 round 0)mod 12+4)*153/5-0.5 round 0)+(4)+(12)/24+(0)/1440+(0)/86400-32167.5}}|Parameter 1=kein Jahr angegeben!}}|{{#if:1582|{{#expr:((((1582)*12+(10)+57608.5 round 0)/12-1.5 round 0)*1461/4-0.5 round 0)+((((10)+57608.5 round 0)mod 12+4)*153/5-0.5 round 0)+4+(12)/24+(0)/1440+(0)/86400-32205.5}}|Parameter 1=kein Jahr angegeben!}}}}|{{#if:2026|{{#expr:((((2026)*12+(05)+57608.5 round 0)/12-1.5 round 0)*1461/4-0.5 round 0)-((((2026)*12+(05)+57608.5 round 0)/12-1.5 round 0)/100-0.5 round 0)+((((2026)*12+(05)+57608.5 round 0)/12-1.5 round 0)/400-0.5 round 0)+((((05)+57608.5 round 0)mod 12+4)*153/5-0.5 round 0)+(14)+(22)/24+({{#expr:floor((20260514223335 mod 10000)/100)}})/1440+({{#expr:20260514223335 mod 100}})/86400-32167.5}}|Parameter 1=kein Jahr angegeben!}}}} (julianischer Kalender){{GetJD|1582|10|15}}= {{#if:1582|{{#ifexpr:((1582)*12+(10)round 0)>18994 or((1582)*12+(10)round 0)=18994 and(15)+(12)/24+(0)/1440+(0)/86400>=15.5|{{#if:1582|{{#expr:((((1582)*12+(10)+57608.5 round 0)/12-1.5 round 0)*1461/4-0.5 round 0)-((((1582)*12+(10)+57608.5 round 0)/12-1.5 round 0)/100-0.5 round 0)+((((1582)*12+(10)+57608.5 round 0)/12-1.5 round 0)/400-0.5 round 0)+((((10)+57608.5 round 0)mod 12+4)*153/5-0.5 round 0)+(15)+(12)/24+(0)/1440+(0)/86400-32167.5}}|Parameter 1=kein Jahr angegeben!}}|{{#if:1582|{{#expr:((((1582)*12+(10)+57608.5 round 0)/12-1.5 round 0)*1461/4-0.5 round 0)+((((10)+57608.5 round 0)mod 12+4)*153/5-0.5 round 0)+15+(12)/24+(0)/1440+(0)/86400-32205.5}}|Parameter 1=kein Jahr angegeben!}}}}|{{#if:2026|{{#expr:((((2026)*12+(05)+57608.5 round 0)/12-1.5 round 0)*1461/4-0.5 round 0)-((((2026)*12+(05)+57608.5 round 0)/12-1.5 round 0)/100-0.5 round 0)+((((2026)*12+(05)+57608.5 round 0)/12-1.5 round 0)/400-0.5 round 0)+((((05)+57608.5 round 0)mod 12+4)*153/5-0.5 round 0)+(14)+(22)/24+({{#expr:floor((20260514223335 mod 10000)/100)}})/1440+({{#expr:20260514223335 mod 100}})/86400-32167.5}}|Parameter 1=kein Jahr angegeben!}}}} (gregorianischer Kalender){{GetJD}}= {{#if:|{{#ifexpr:(({{{1}}})*12+(1)round 0)>18994 or(({{{1}}})*12+(1)round 0)=18994 and(1)+(12)/24+(0)/1440+(0)/86400>=15.5|{{#if:{{{1}}}|{{#expr:(((({{{1}}})*12+(1)+57608.5 round 0)/12-1.5 round 0)*1461/4-0.5 round 0)-(((({{{1}}})*12+(1)+57608.5 round 0)/12-1.5 round 0)/100-0.5 round 0)+(((({{{1}}})*12+(1)+57608.5 round 0)/12-1.5 round 0)/400-0.5 round 0)+((((1)+57608.5 round 0)mod 12+4)*153/5-0.5 round 0)+(1)+(12)/24+(0)/1440+(0)/86400-32167.5}}|Parameter 1=kein Jahr angegeben!}}|{{#if:{{{1}}}|{{#expr:(((({{{1}}})*12+(1)+57608.5 round 0)/12-1.5 round 0)*1461/4-0.5 round 0)+((((1)+57608.5 round 0)mod 12+4)*153/5-0.5 round 0)+1+(12)/24+(0)/1440+(0)/86400-32205.5}}|Parameter 1=kein Jahr angegeben!}}}}|{{#if:2026|{{#expr:((((2026)*12+(05)+57608.5 round 0)/12-1.5 round 0)*1461/4-0.5 round 0)-((((2026)*12+(05)+57608.5 round 0)/12-1.5 round 0)/100-0.5 round 0)+((((2026)*12+(05)+57608.5 round 0)/12-1.5 round 0)/400-0.5 round 0)+((((05)+57608.5 round 0)mod 12+4)*153/5-0.5 round 0)+(14)+(22)/24+({{#expr:floor((20260514223335 mod 10000)/100)}})/1440+({{#expr:20260514223335 mod 100}})/86400-32167.5}}|Parameter 1=kein Jahr angegeben!}}}} (jetzt, Koordinierte Weltzeit)
Die inverse Funktion ist {{{{#if:|subst:}}{{#if:
|JD
|{{#ifeq:J
|:
|:JD
|{{#switch:
|=JD
|#default=JD}}}}}}{{#ifeq:x|{{{2}}}|{{#if:|
}}|{{{2}}}}}{{#ifeq:x|{{{3}}}|{{#if:|
}}|{{{3}}}}}{{#ifeq:x|{{{4}}}|{{#if:|
}}|{{{4}}}}}{{#ifeq:x|{{{5}}}|{{#if:|
}}|{{{5}}}}}{{#ifeq:x|{{{6}}}|{{#if:|
}}|{{{6}}}}}{{#ifeq:x|{{{7}}}|{{#if:|
}}|{{{7}}}}}{{#ifeq:x|{{{8}}}|{{#if:|
}}|{{{8}}}}}{{#ifeq:x|{{{9}}}|{{#if:|
}}|{{{9}}}}}{{#ifeq:x|{{{10}}}|{{#if:|
}}|{{{10}}}}}{{#ifeq:x|{{{11}}}|{{#if:|
}}|…}}{{#if:|
}}}}{{#if: | (Anzahl der Einbindungen)|}}, jedoch nur ab dem Julianischen Datum 2299160,5 d.h. dem 15. Oktober 1582.