Template:JULIANDAY

From Vigyanwiki
Revision as of 05:56, 30 April 2006 by Template>CBDunkerson (Adding optional hour and minute calculations)

Template:Template documentation This template computes the number of the Julian day starting at noon on the date given in parameter (in the gregorian calendar, without the julian correction for proleptic years).

Syntax:
{{JULIANDAY|year|month|day|hour|minute}}
  • The year must be astronomical (year=1 in 1 AD (Anno Domini), year=0 in 1 BC, year=-1 in 2 BC).
  • The month is expressed between 1 et 12 from january to december.
  • The day is normally between 1 et 31 (but offsets are possible for computing other days).
  • The hour is between 0 and 23. Note that Julian days begin at noon (hour = 12) and thus hours 0-11 of a solar day are one Julian day earlier than hours 12-23.
  • The minute is between 0 and 59.
Note:
The julian day, when computed modulo 7, grows from 0 (on monday at noon) to 6 (on sunday at noon)) and falls back to 0 (on next monday). This corresponds to the order of days in the ISO week.
Examples:
{{JULIANDAY|-4713|11|24}} returns -0.5 (an 4714 av. J.-C., proleptic)
{{JULIANDAY|0|1|1}} returns 1721059.5 (an 1 av. J.-C., proleptic)
{{JULIANDAY|0|12|31}} returns 1721424.5
{{JULIANDAY|1|1|1}} returns 1721425.5 (Anno Domini, proleptic)
{{JULIANDAY|1752|2|29}} returns 2361023.5 (last proleptic day)
{{JULIANDAY|1752|3|1}} returns 2361024.5 (first non proleptic day)
{{JULIANDAY|1999|12|31}} returns 2451543.5
{{JULIANDAY|2000|1|1}} returns 2451544.5
{{JULIANDAY|2000|1|2}} returns 2451545.5
{{JULIANDAY|2000|2|1}} returns 2451575.5
{{JULIANDAY|2000|3|1}} returns 2451604.5
{{JULIANDAY|2000|12|31}} returns 2451909.5
{{JULIANDAY|2001|12|31}} returns 2452274.5
{{JULIANDAY|2002|12|31}} returns 2452639.5
{{JULIANDAY|2003|12|31}} returns 2453004.5
{{JULIANDAY|2006|2|1}} returns 2453767.5
{{JULIANDAY|2006|3|1}} returns 2453795.5
{{JULIANDAY|2006|3|31}} returns 2453825.5
{{JULIANDAY|2006|4|30}} returns 2453855.5
{{JULIANDAY|2006|4|30|1|27}} returns 2453855.5604167
See also:
Template:YEARCC
Template:YEARYY
Template:CENTURY
Template:ISLEAPYEAR
Template:WEEKDAY
Template:ISOYEAR
Template:CURRENTJULIANDAY