Changes

Jump to navigation Jump to search
no edit summary
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
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 4 October 1582.

=== Syntax ===
: <tt><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|</nowiki></tt>''year''<tt><nowiki>|</nowiki></tt>''[month]''<tt><nowiki>|</nowiki></tt>''[day]''<tt><nowiki>|</nowiki></tt>''[hour]''<tt><nowiki>|</nowiki></tt>''[minute]''<tt><nowiki>|</nowiki></tt>''[second]''<tt><nowiki>}}</nowiki></tt>
: <tt><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></tt>
* 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). Note that 24-hours format is used, so an ''hour'' parameter lower than 12 indicates the previous day in the old Julian day counting system, where days started at 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 {{ {{BASEPAGENAME}} }} now.
* <tt>{{tlx|{{BASEPAGENAME}}|1582|10|05|11|59|59}}</tt> returns {{ {{BASEPAGENAME}}|1582|10|05|11|59|59}} (this is the last valid instant of a Julian date before the Gregorian change, before noon, so actually it is still 4 October with the old date counting where days start at noon).
* <tt>{{tlx|{{BASEPAGENAME}}|1582|10|15|12|00|00}}</tt> returns {{ {{BASEPAGENAME}}|1582|10|15|12|00|00}} (this is the first instant of a Gregorian date, on 15 October at noon, i.e. 5 October at noon in the previous Julian calendar).
* <tt>{{tlx|{{BASEPAGENAME}}|1582|10|15|11|59|59}}</tt> returns {{ {{BASEPAGENAME}}|1582|10|15|11|59|59}} (this is still a date of the Julian calendar ''after'' the Gregorian change, and it is actually still the 14th of October before noon with the Julian calendar and the old Julian day counting system, or the 24th of October before noon with the proleptic Gregorian calendar and the old Julian day counting system where dates still changed at noon).
* <tt>{{tlx|{{BASEPAGENAME}}|1582|10|25|11|59|59}}</tt> returns {{ {{BASEPAGENAME}}|1582|10|15|11|59|59}} (this is still the same instant in the Gregorian calendar).

===''Note''===
''the results may seem wrong, but they are not. The interpretation is given by comparing the Julian and Gregorian dates, so read twice the description of the third example; the exact calendar shift occurred between examples 1 and 2, and the 4th example is unambiguously in the Gregorian calendar.''

=== See also ===
* [[Template:JULIANDAY]] (version taking a date in the Gregorian calendar only)
* [[Template:JULIANDAY.JULIAN]] (version taking a date in the Julian calendar only)

<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Date-computing templates|{{PAGENAME}}]]

</includeonly>

<includeonly>
[[zh:Template:JD]]
</includeonly>
Anonymous user

Navigation menu