Difference between revisions of "Template:JULIANDAY/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Habst
(→‎Sandbox: just year)
imported>Johnuniq
(use fix=on or partial=on where needed)
Line 328: Line 328:
 
;Examples adapted from {{Ltsmeta|YMD2MJD}}:
 
;Examples adapted from {{Ltsmeta|YMD2MJD}}:
 
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>02</tt>|<tt>28</tt>}} = {{JULIANDAY/sandbox|1900|02|28}}, last day of February 1900
 
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>02</tt>|<tt>28</tt>}} = {{JULIANDAY/sandbox|1900|02|28}}, last day of February 1900
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>02</tt>|<tt>29</tt>}} = {{JULIANDAY/sandbox|1900|02|29}}, bogey but okay
+
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>02</tt>|<tt>29</tt>|fix=on}} = {{JULIANDAY/sandbox|1900|02|29|fix=on}}, bogey but okay
 
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>03</tt>|<tt>01</tt>}} = {{JULIANDAY/sandbox|1900|03|01}}, no leap year
 
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>03</tt>|<tt>01</tt>}} = {{JULIANDAY/sandbox|1900|03|01}}, no leap year
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>02</tt>|<tt>30</tt>}} = {{JULIANDAY/sandbox|1900|02|30}}, bogey but okay
+
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>02</tt>|<tt>30</tt>|fix=on}} = {{JULIANDAY/sandbox|1900|02|30|fix=on}}, bogey but okay
 
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>03</tt>|<tt>02</tt>}} = {{JULIANDAY/sandbox|1900|03|02}}  
 
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>03</tt>|<tt>02</tt>}} = {{JULIANDAY/sandbox|1900|03|02}}  
 
:{{Tlx|JULIANDAY|<tt>2000</tt>|<tt>02</tt>|<tt>29</tt>}} = {{JULIANDAY/sandbox|2000|02|29}}, last day of February 2000
 
:{{Tlx|JULIANDAY|<tt>2000</tt>|<tt>02</tt>|<tt>29</tt>}} = {{JULIANDAY/sandbox|2000|02|29}}, last day of February 2000
:{{Tlx|JULIANDAY|<tt>2000</tt>|<tt>02</tt>|<tt>30</tt>}} = {{JULIANDAY/sandbox|2000|02|30}}, bogey but okay
+
:{{Tlx|JULIANDAY|<tt>2000</tt>|<tt>02</tt>|<tt>30</tt>|fix=on}} = {{JULIANDAY/sandbox|2000|02|30|fix=on}}, bogey but okay
 
:{{Tlx|JULIANDAY|<tt>2000</tt>|<tt>03</tt>|<tt>01</tt>}} = {{JULIANDAY/sandbox|2000|03|01}}, leap year
 
:{{Tlx|JULIANDAY|<tt>2000</tt>|<tt>03</tt>|<tt>01</tt>}} = {{JULIANDAY/sandbox|2000|03|01}}, leap year
:{{Tlx|JULIANDAY|<tt>2000</tt>|<tt>02</tt>|<tt>31</tt>}} = {{JULIANDAY/sandbox|2000|02|31}}, bogey but okay
+
:{{Tlx|JULIANDAY|<tt>2000</tt>|<tt>02</tt>|<tt>31</tt>|fix=on}} = {{JULIANDAY/sandbox|2000|02|31|fix=on}}, bogey but okay
 
:{{Tlx|JULIANDAY|<tt>2000</tt>|<tt>03</tt>|<tt>02</tt>}} = {{JULIANDAY/sandbox|2000|03|02}}
 
:{{Tlx|JULIANDAY|<tt>2000</tt>|<tt>03</tt>|<tt>02</tt>}} = {{JULIANDAY/sandbox|2000|03|02}}
 
:{{Tlx|JULIANDAY|<tt>{{CURRENTYEAR}}</tt>|<tt>{{CURRENTMONTH}}</tt>|<tt>{{CURRENTDAY2}}</tt>}} = {{JULIANDAY/sandbox|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY2}}}}
 
:{{Tlx|JULIANDAY|<tt>{{CURRENTYEAR}}</tt>|<tt>{{CURRENTMONTH}}</tt>|<tt>{{CURRENTDAY2}}</tt>}} = {{JULIANDAY/sandbox|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY2}}}}
Line 342: Line 342:
  
 
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>02</tt>}} = {{JULIANDAY|1900|02}}, should work
 
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>02</tt>}} = {{JULIANDAY|1900|02}}, should work
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>02</tt>}} = {{JULIANDAY/sandbox|1900|02}}, should work
+
:{{Tlx|JULIANDAY|<tt>1900</tt>|<tt>02</tt>|partial=on}} = {{JULIANDAY/sandbox|1900|02|partial=on}}, should work
  
 
:{{Tlx|JULIANDAY|<tt>1900</tt>}} = {{JULIANDAY|1900}}, just year
 
:{{Tlx|JULIANDAY|<tt>1900</tt>}} = {{JULIANDAY|1900}}, just year
:{{Tlx|JULIANDAY|<tt>1900</tt>}} = {{JULIANDAY/sandbox|1900}}, just year
+
:{{Tlx|JULIANDAY|<tt>1900</tt>|partial=on}} = {{JULIANDAY/sandbox|1900|partial=on}}, just year
  
 
<!--
 
<!--

Revision as of 10:10, 18 June 2018

Live template

Adapted from m:Template talk:YMD2MJD
Code Result MJD JD REXX
{{JULIANDAY|0000|03|01|0}} = 1721119.5 -678881 1721119.5 -306
{{JULIANDAY|0001|01|31|0}} = 1721455.5 -678545 1721455.5 30
{{JULIANDAY|0001|02|01|0}} = 1721456.5 -678544 1721456.5 31
{{JULIANDAY|0001|02|28|0}} = 1721483.5 -678517 1721483.5 58
{{JULIANDAY|0001|03|01|0}} = 1721484.5 -678516 1721484.5 59
{{JULIANDAY|0001|08|31|0}} = 1721667.5 -678333 1721667.5 242
{{JULIANDAY|0001|09|01|0}} = 1721668.5 -678332 1721668.5 243
{{JULIANDAY|0004|02|29|0}} = 1722579.5 -677421 1722579.5 1154
{{JULIANDAY|0004|03|01|0}} = 1722580.5 -677420 1722580.5 1155
{{JULIANDAY|1259|03|02|0}} = 2180960.5 -219040 2180960.5 459535
{{JULIANDAY|1516|12|30|0}} = 2275130.5 -124870 2275130.5 553705
{{JULIANDAY|1582|10|15|0}} = 2299160.5 -100840 2299160.5 577735
{{JULIANDAY|1752|09|14|0}} = 2361221.5 -38779 2361221.5 639796
{{JULIANDAY|1858|11|17|0}} = 2400000.5 0 2400000.5 678575
{{JULIANDAY|1895|02|28|0}} = 2413252.5 13252 2413252.5 691827
{{JULIANDAY|1895|03|01|0}} = 2413253.5 13253 2413253.5 691828
{{JULIANDAY|1896|02|29|0}} = 2413618.5 13618 2413618.5 692193
{{JULIANDAY|1896|03|01|0}} = 2413619.5 13619 2413619.5 692194
{{JULIANDAY|1900|02|28|0}} = 2415078.5 15078 2415078.5 693653
{{JULIANDAY|1900|03|01|0}} = 2415079.5 15079 2415079.5 693654
{{JULIANDAY|1970|01|01|0}} = 2440587.5 40587 2440587.5 719162
{{JULIANDAY|2000|02|29|0}} = 2451603.5 51603 2451603.5 730178
{{JULIANDAY|2000|03|01|0}} = 2451604.5 51604 2451604.5 730179
{{JULIANDAY|2738|11|28|0}} = 2721424.5 321424 2721424.5 999999
Examples adapted from Template:YMD2MJD Template:Toolbar at Meta:
{{JULIANDAY|1900|02|28}} = 2415079, last day of February 1900
{{JULIANDAY|1900|02|29}} = 2415080, bogey but okay
{{JULIANDAY|1900|03|01}} = 2415080, no leap year
{{JULIANDAY|1900|02|30}} = 2415081, bogey but okay
{{JULIANDAY|1900|03|02}} = 2415081
{{JULIANDAY|2000|02|29}} = 2451604, last day of February 2000
{{JULIANDAY|2000|02|30}} = 2451605, bogey but okay
{{JULIANDAY|2000|03|01}} = 2451605, leap year
{{JULIANDAY|2000|02|31}} = 2451606, bogey but okay
{{JULIANDAY|2000|03|02}} = 2451606
{{JULIANDAY|2025|09|06}} = 2460925

Sandbox

Adapted from m:Template talk:YMD2MJD
Code Result MJD JD REXX
{{JULIANDAY|0000|03|01|0}} = 1721119.5 -678881 1721119.5 -306
{{JULIANDAY|0001|01|31|0}} = 1721455.5 -678545 1721455.5 30
{{JULIANDAY|0001|02|01|0}} = 1721456.5 -678544 1721456.5 31
{{JULIANDAY|0001|02|28|0}} = 1721483.5 -678517 1721483.5 58
{{JULIANDAY|0001|03|01|0}} = 1721484.5 -678516 1721484.5 59
{{JULIANDAY|0001|08|31|0}} = 1721667.5 -678333 1721667.5 242
{{JULIANDAY|0001|09|01|0}} = 1721668.5 -678332 1721668.5 243
{{JULIANDAY|0004|02|29|0}} = 1722579.5 -677421 1722579.5 1154
{{JULIANDAY|0004|03|01|0}} = 1722580.5 -677420 1722580.5 1155
{{JULIANDAY|1259|03|02|0}} = 2180960.5 -219040 2180960.5 459535
{{JULIANDAY|1516|12|30|0}} = 2275130.5 -124870 2275130.5 553705
{{JULIANDAY|1582|10|15|0}} = 2299160.5 -100840 2299160.5 577735
{{JULIANDAY|1752|09|14|0}} = 2361221.5 -38779 2361221.5 639796
{{JULIANDAY|1858|11|17|0}} = 2400000.5 0 2400000.5 678575
{{JULIANDAY|1895|02|28|0}} = 2413252.5 13252 2413252.5 691827
{{JULIANDAY|1895|03|01|0}} = 2413253.5 13253 2413253.5 691828
{{JULIANDAY|1896|02|29|0}} = 2413618.5 13618 2413618.5 692193
{{JULIANDAY|1896|03|01|0}} = 2413619.5 13619 2413619.5 692194
{{JULIANDAY|1900|02|28|0}} = 2415078.5 15078 2415078.5 693653
{{JULIANDAY|1900|03|01|0}} = 2415079.5 15079 2415079.5 693654
{{JULIANDAY|1970|01|01|0}} = 2440587.5 40587 2440587.5 719162
{{JULIANDAY|2000|02|29|0}} = 2451603.5 51603 2451603.5 730178
{{JULIANDAY|2000|03|01|0}} = 2451604.5 51604 2451604.5 730179
{{JULIANDAY|2738|11|28|0}} = 2721424.5 321424 2721424.5 999999
Examples adapted from Template:YMD2MJD Template:Toolbar at Meta:
{{JULIANDAY|1900|02|28}} = 2415079, last day of February 1900
{{JULIANDAY|1900|02|29}} = Error: Need valid year|month|day or "currentdate", bogey but okay
{{JULIANDAY|1900|03|01}} = 2415080, no leap year
{{JULIANDAY|1900|02|30}} = Error: Need valid year|month|day or "currentdate", bogey but okay
{{JULIANDAY|1900|03|02}} = 2415081
{{JULIANDAY|2000|02|29}} = 2451604, last day of February 2000
{{JULIANDAY|2000|02|30}} = Error: Need valid year|month|day or "currentdate", bogey but okay
{{JULIANDAY|2000|03|01}} = 2451605, leap year
{{JULIANDAY|2000|02|31}} = Error: Need valid year|month|day or "currentdate", bogey but okay
{{JULIANDAY|2000|03|02}} = 2451606
{{JULIANDAY|2025|09|06}} = 2460925
Added in 2018
{{JULIANDAY|1900|02}} = 2415052, should work
{{JULIANDAY|1900|02}} = Error: Need valid year|month|day or "currentdate", should work
{{JULIANDAY|1900}} = 2415021, just year
{{JULIANDAY|1900}} = Error: Need valid year|month|day or "currentdate", just year