Template:JD/Gregorian

From blackwiki
< Template:JD
Revision as of 09:10, 30 April 2006 by imported>Verdy p
Jump to navigation Jump to search

Template:Template documentation

This template convert Gregorian calendar to Julian date. The returned value is an integer at noon.

Syntax:
{{JD/Gregorian|year|month|day|hour|minute|second}}
{{JD/Gregorian|year|month|day|hour|minute}}
{{JD/Gregorian|year|month|day|hour}}
{{JD/Gregorian|year|month|day}}
  • At least the three first date elements are required.
  • Date elements are interpreted in the (possibly proleptic) Gregorian calendar, and accepts a negative or nul year (considered in the UTC astronomical calendar).
  • The month parameter is usually between 1 and 12; however it is used relatively from the start of the specified year (a Julian year is exactly 12 Julian months); so the year and month parameters can both include decimals and are first converted into a rounded number of Julian months since December 4800 BC; for this initial computing, the day parameter and time element parameters are ignored.
  • The day and time element parameters may have decimals or can be out of the range of regular Julian days.
  • The hour parameter is 0 to 23 within the same day, but can extend to any value (for computing other days); if missing, its takes default is 12 for noon (which is the start of a Julian day).
  • The minute and second parameter are usually 0 to 59, but can extend to any value; if missing, their default is 0.
  • No correction is applied for (unpredictable and irregular in the past) leap seconds in the UTC calendar (all days are considered 24 hours exactly), so the returned value is not an exact timestamp with linear growth.
Examples:
  • {{JD/Gregorian|1582|10|15|11|59|59}} returns 2299160.9999884 (instant in the proleptic Gregorian calendar, before noon, still October the 14th with the old Julian day counting system where days started at noon, and actually still the last second of October the 4th in the Julian calendar).
  • {{JD/Gregorian|1582|10|15|12|00|00}} returns 2299161 (first instant of the first day of the Gregorian calendar).
  • {{JD/Gregorian|2000|02|29}} returns 2451604.
  • {{JD/Gregorian|2000|02|29|23|59|59}} returns 2451604.4999884.
  • {{JD/Gregorian|2000|03|01|00}} returns 2451604.5.
  • {{JD/Gregorian|2000|03|01}} returns 2451605.
  • {{JD/Gregorian|2000|03|01|12}} returns 2451605.
  • {{JD/Gregorian|2000|03|01|12|00|01}} returns 2451605.0000116.
  • {{JD/Gregorian|2000|03|01|12|01}} returns 2451605.0006944.
  • {{JD/Gregorian|2000|03|01|13}} returns 2451605.0416667.
  • {{JD/Gregorian|2000|03|01|24}} returns 2451605.5.
  • {{JD/Gregorian|2000|03|02|00}} returns 2451605.5.
  • {{JD/Gregorian|2000|03|01|36}} returns 2451606.
  • {{JD/Gregorian|2000|03|02}} returns 2451606.
  • {{JD/Gregorian|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}|{{CURRENTHOUR}}||{{CURRENTMINUTE}}}} returns 2460815.2645833
See also: