Difference between revisions of "Template:JD"

From blackwiki
Jump to navigation Jump to search
imported>Verdy p
m
imported>Verdy p
m
Line 1: Line 1:
 
<includeonly>{{#if:{{{1|}}}|
 
<includeonly>{{#if:{{{1|}}}|
{{#ifexpr:
+
{{#ifexpr:(({{{1}}})*12+({{{2|1}}})round 0)>18994 or(({{{1}}})*12+({{{2|1}}})round 0)=18994 and
( ({{{1}}}) *12+ ({{{2|1}}}) round 0)>18994 or
+
({{{3|1}}})+({{{4|12}}})/24+({{{5|0}}})/1440+({{{6|0}}})/86400>=15.5
( ({{{1}}}) *12+ ({{{2|1}}}) round 0)=18994 and ({{{3|1}}}) >=15
 
 
|G{{JD/Gregorian|{{{1}}}|{{{2|1}}}|{{{3|1}}}|{{{4|12}}}|{{{5|0}}}|{{{6|0}}}}}
 
|G{{JD/Gregorian|{{{1}}}|{{{2|1}}}|{{{3|1}}}|{{{4|12}}}|{{{5|0}}}|{{{6|0}}}}}
 
|J{{JD/Julian  |{{{1}}}|{{{2|1}}}|{{{3|1}}}|{{{4|12}}}|{{{5|0}}}|{{{6|0}}}}}}}
 
|J{{JD/Julian  |{{{1}}}|{{{2|1}}}|{{{3|1}}}|{{{4|12}}}|{{{5|0}}}|{{{6|0}}}}}}}
Line 17: Line 16:
 
* Otherwise, all parameters for the date and time must be specified as valid numeric expressions.
 
* Otherwise, all parameters for the date and time must be specified as valid numeric expressions.
 
* The default ''day'' and ''month'' are 1.
 
* The default ''day'' and ''month'' are 1.
* The computed ''year'' and ''month'' parameters are first converted into a rounded number of months since 01 December 1 AD and then converted to the actual ''year'' and ''month''. For this prior computing, the ''day'' parameter is ignored.
+
* The computed ''year'' and ''month'' parameters are first converted into a rounded number of months since 01 December 1 AD and then converted to the actual ''year'' and ''month''. For this prior computing, the ''day'' parameter and time parameters are ignored.
 
* The default ''hour'' is 12 (for noon).
 
* The default ''hour'' is 12 (for noon).
* The default ''minute'' or second is 0.
+
* The default ''minute'' or ''second'' is 0.
 
* Any date whose actual ''month'' and ''year'' are before October 1582, or are October 1582 but the computed ''day'' parameter is before the 15th at noon, will be interpreted as dates in the Julian calendar.
 
* Any date whose actual ''month'' and ''year'' are before October 1582, or are October 1582 but the computed ''day'' parameter is before the 15th at noon, will be interpreted as dates in the Julian calendar.
  

Revision as of 08:17, 30 April 2006

Template:Template documentation

This template converts date elements, or date and time elements, into a Julian date timestamp. It interprets all dates starting at 15 October 1582 in the Gregorian calendar, otherwise it uses the Julian calendar that was valid until 04 October 1582.

Syntax:
{{JD|year|[month]|[day]|[hour]|[minute]|[second]}}
{{JD}}
  • If the year parameter is missing, all other parameters are ignored, and their default is the current UTC date and time, as set on the server.
  • Otherwise, all parameters for the date and time must be specified as valid numeric expressions.
  • The default day and month are 1.
  • The computed year and month parameters are first converted into a rounded number of months since 01 December 1 AD and then converted to the actual year and month. For this prior computing, the day parameter and time parameters are ignored.
  • The default hour is 12 (for noon).
  • The default minute or second is 0.
  • Any date whose actual month and year are before October 1582, or are October 1582 but the computed day parameter is before the 15th at noon, will be interpreted as dates in the Julian calendar.
Example:
  • It is JD 2461052.9256944 now.
  • {{JD|1582|10|15|11|59|59}} returns JTemplate:JD/Julian.
  • {{JD|1582|10|15}} returns G2299161.
See also: