Template:JULIANDAY.DAY/doc

From Nordic Larp Wiki
< Template:JULIANDAY.DAY
Revision as of 18:18, 30 October 2017 by en>Txantimedia (Changed the headings from <nowiki>; heading <nowiki>:</nowiki></nowiki> to use Headings, which are editable by section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This template takes a julian day number and returns the associated day of month within the Gregorian calendar.

Computing formula (partially indented) 

For more information about how this formula works, see Julian day.
{{#expr:
     ((({{{1}}})+32044 round 0)mod 146097+36524-
    (((({{{1}}})+32044 round 0)mod 146097/36524+0.5 round 0)*3/4+0.5 round 0)*36524
     )mod 1461-
   ((((({{{1}}})+32044 round 0)mod 146097+36524-
    (((({{{1}}})+32044 round 0)mod 146097/36524+0.5 round 0)*3/4+0.5 round 0)*36524
     )mod 1461/365+0.5 round 0)*3/4+0.5 round 0)*365-
(((((((({{{1}}})+32044 round 0)mod 146097+36524-
    (((({{{1}}})+32044 round 0)mod 146097/36524+0.5 round 0)*3/4+0.5 round 0)*36524
     )mod 1461-
   ((((({{{1}}})+32044 round 0)mod 146097+36524-
    (((({{{1}}})+32044 round 0)mod 146097/36524+0.5 round 0)*3/4+0.5 round 0)*36524
     )mod 1461/365+0.5 round 0)*3/4+0.5 round 0)*365+365)*5+308)/153-0.5 round 0)+2
     )*153/5+0.5 round 0)+489
}}

Examples with a non-leap secular year (of rank 3) 

  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 1| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 1|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 2| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 2|28}}}} = "28".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 3| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 3|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 4| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 4|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 5| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 5|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 6| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 6|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 7| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 7|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 8| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 8|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 9| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900| 9|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900|10| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900|10|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900|11| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900|11|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900|12| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|1900|12|31}}}} = "31".

Examples with a leap secular year (of rank 4) 

  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 1| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 1|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 2| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 2|29}}}} = "29".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 3| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 3|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 4| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 4|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 5| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 5|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 6| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 6|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 7| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 7|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 8| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 8|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 9| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000| 9|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000|10| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000|10|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000|11| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000|11|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000|12| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2000|12|31}}}} = "31".

Examples with a non-leap non-secular year (of rank 1) 

  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 1| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 1|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 2| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 2|28}}}} = "28".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 3| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 3|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 4| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 4|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 5| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 5|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 6| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 6|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 7| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 7|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 8| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 8|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 9| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001| 9|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001|10| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001|10|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001|11| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001|11|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001|12| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2001|12|31}}}} = "31".

Examples with a non-leap non-secular year (of rank 2) 

  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 1| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 1|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 2| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 2|28}}}} = "28".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 3| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 3|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 4| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 4|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 5| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 5|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 6| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 6|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 7| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 7|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 8| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 8|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 9| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002| 9|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002|10| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002|10|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002|11| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002|11|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002|12| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2002|12|31}}}} = "31".

Examples with a non-leap non-secular year (of rank 3) 

  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 1| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 1|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 2| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 2|28}}}} = "28".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 3| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 3|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 4| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 4|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 5| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 5|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 6| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 6|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 7| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 7|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 8| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 8|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 9| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003| 9|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003|10| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003|10|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003|11| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003|11|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003|12| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2003|12|31}}}} = "31".

Examples with a non-leap non-secular year (of rank 4) 

  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 1| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 1|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 2| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 2|29}}}} = "29".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 3| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 3|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 4| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 4|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 5| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 5|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 6| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 6|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 7| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 7|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 8| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 8|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 9| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004| 9|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004|10| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004|10|31}}}} = "31".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004|11| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004|11|30}}}} = "30".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004|12| 1}}}} = "1".
  • {{JULIANDAY.DAY|{{JULIANDAY|2004|12|31}}}} = "31".

See also