Template:JULIANDAY: Difference between revisions

From Vigyanwiki
Template>Verdy p
mNo edit summary
Template>Verdy p
mNo edit summary
Line 14: Line 14:
; Note<nowiki>:</nowiki>
; Note<nowiki>:</nowiki>
: 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.
: 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.
; Compatibility synonym (redirected)<nowiki>:</nowiki>
* [[Template:JD]]


; Examples<nowiki>:</nowiki>
; Examples<nowiki>:</nowiki>

Revision as of 15:53, 3 May 2006

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 any Julian correction for proleptic years).

Syntax:
{{JULIANDAY|year|[month]|[day]|[hour]|[minute]|[second]}}
  • The year (required) must be astronomical (year=1 in 1 AD (Anno Domini), year=0 in 1 BC, year=-1 in 2 BC).
  • The month (optional, default value 1) is expressed between 1 et 12 from january to december (but offsets are possible for computing other years).
  • The year and month are first converted into a number of months, then rounded to the nearest integer to compute the actual year and month used for computing dates.
  • The day (optional, default value 1) is normally between 1 et 31 (but offsets are possible for computing other months). Decimals are possible for fractions of day.
  • The hour (optional, default value 12) is normally between 0 and 23 (but offsets are possible for computing other days). 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 value may extend outside of the normal range and is considered as additional number of julian days (a Julian day is 24 hours or 86400 seconds exactly, ignoring any adjustment of leap seconds within the UTC calendar). Decimals are possible for fractions of hour.
  • The minute and second (optional, default value 0) are normally between 0 and 59 (but offsets are possible for computing other hours). Decimals are possible for fractions of minute or second.
  • All parameters can be any valid numeric expression which is evaluated before computing.
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.
Compatibility synonym (redirected):
Examples:
{{JULIANDAY|-4713|11|24}} returns 0 (in year 4714 BC, proleptic)
{{JULIANDAY|0|1|1}} returns 1721060 (in year 1 BC, proleptic)
{{JULIANDAY|0|12|31}} returns 1721425
{{JULIANDAY|1|1|1}} returns 1721426 (Anno Domini, proleptic)
{{JULIANDAY|1782|10|24}} returns 2372219 (last proleptic Gregorian day, actually the 4th of october in the Julian calendar)
{{JULIANDAY|1782|10|25}} returns 2372220 (first non proleptic Gregorian day, equals the 5th of october in the previous Julian calendar)
{{JULIANDAY|1999|12|31}} returns 2451544
{{JULIANDAY|2000|1|1}} returns 2451545
{{JULIANDAY|2000|1|2}} returns 2451546
{{JULIANDAY|2000|2|1}} returns 2451576
{{JULIANDAY|2000|3|1}} returns 2451605
{{JULIANDAY|2000|12|31}} returns 2451910
{{JULIANDAY|2001|12|31}} returns 2452275
{{JULIANDAY|2002|12|31}} returns 2452640
{{JULIANDAY|2003|12|31}} returns 2453005
{{JULIANDAY|2006|2|1}} returns 2453768
{{JULIANDAY|2006|3|1}} returns 2453796
{{JULIANDAY|2006|3|31}} returns 2453826
{{JULIANDAY|2006|4|30|0|0|0}} returns 2453855.5
{{JULIANDAY|2006|4|30|01|35|48}} returns 2453855.5665278
{{JULIANDAY|2006|4|30|11|59|60}} returns 2453856
{{JULIANDAY|2006|4|30|12.0}} returns 2453856
{{JULIANDAY|2006|4|30}} returns 2453856
{{JULIANDAY|2006|4|30|23|59|59}} returns 2453856.4999884
{{JULIANDAY|2006|5|1|00|00|00}} returns 2453856.5
{{JULIANDAY|2006|5|1|12|00|00}} returns 2453857
{{JULIANDAY|2006|5|1}} returns 2453857
See also:
Template:YEARCC
Template:YEARYY
Template:CENTURY
Template:ISLEAPYEAR
Template:WEEKDAY
Template:ISOYEAR
Template:CURRENTJULIANDAY