Template:JD/Gregorian

From blackwiki
< Template:JD
Revision as of 06:12, 30 April 2006 by imported>Verdy p (error in documentation only)
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 year and month parameters are rounded to the nearest integer only.
  • The day and time element parameters may have decimals or can be out of the range of regular days of month.
  • The hour parameter is 0 to 23 within the same day, but can extend to any value; if missing, its takes default is 12 for noon.
  • The minute and second parameter are 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|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 2461130.7409722
See also: