Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code> &lt;script language=&quot;JavaScript&quot;&gt; &lt;!-- function dstrToUTC(ds) { var dsarr = ds.split(&quot;/&quot;); var mm = parseInt(dsarr[0],10); var dd = parseInt(dsarr[1],10); var yy = parseInt(dsarr[2],10); return Date.UTC(yy,mm-1,dd,0,0,0); } function datediff(ds1,ds2) { var d1 = dstrToUTC(ds1); var d2 = dstrToUTC(ds2); var oneday = 86400000; return (d2-d1) / oneday; } // test cases are below var a; var b; a = &quot;01/09/1999&quot;; b = &quot;01/10/1999&quot;; document.write(&quot;From &quot;+a+&quot; to &quot;+b+&quot; is &quot;+datediff(a,b)+&quot; day(s)&lt;br&gt;&quot;); a = &quot;01/12/1999&quot;; b = &quot;01/19/1999&quot;; document.write(&quot;From &quot;+a+&quot; to &quot;+b+&quot; is &quot;+datediff(a,b)+&quot; day(s)&lt;br&gt;&quot;); a = &quot;01/19/1999&quot;; b = &quot;01/12/1999&quot;; document.write(&quot;From &quot;+a+&quot; to &quot;+b+&quot; is &quot;+datediff(a,b)+&quot; day(s)&lt;br&gt;&quot;); a = &quot;01/03/1999&quot;; b = &quot;01/13/1999&quot;; document.write(&quot;From &quot;+a+&quot; to &quot;+b+&quot; is &quot;+datediff(a,b)+&quot; day(s)&lt;br&gt;&quot;); a = &quot;04/30/1999&quot;; b = &quot;05/01/1999&quot;; document.write(&quot;From &quot;+a+&quot; to &quot;+b+&quot; is &quot;+datediff(a,b)+&quot; day(s)&lt;br&gt;&quot;); a = &quot;05/30/1999&quot;; b = &quot;06/01/1999&quot;; document.write(&quot;From &quot;+a+&quot; to &quot;+b+&quot; is &quot;+datediff(a,b)+&quot; day(s)&lt;br&gt;&quot;); a = &quot;02/28/1999&quot;; b = &quot;03/01/1999&quot;; document.write(&quot;From &quot;+a+&quot; to &quot;+b+&quot; is &quot;+datediff(a,b)+&quot; day(s)&lt;br&gt;&quot;); a = &quot;02/28/2000&quot;; b = &quot;03/01/2000&quot;; document.write(&quot;From &quot;+a+&quot; to &quot;+b+&quot; is &quot;+datediff(a,b)+&quot; day(s)&lt;br&gt;&quot;); a = &quot;01/01/1999&quot;; b = &quot;12/31/1999&quot;; document.write(&quot;From &quot;+a+&quot; to &quot;+b+&quot; is &quot;+datediff(a,b)+&quot; day(s)&lt;br&gt;&quot;); a = &quot;01/01/2000&quot;; b = &quot;12/31/2000&quot;; document.write(&quot;From &quot;+a+&quot; to &quot;+b+&quot; is &quot;+datediff(a,b)+&quot; day(s)&lt;br&gt;&quot;); a = &quot;12/15/1999&quot;; b = &quot;01/15/2001&quot;; document.write(&quot;From &quot;+a+&quot; to &quot;+b+&quot; is &quot;+datediff(a,b)+&quot; day(s)&lt;br&gt;&quot;); // --&gt; &lt;/script&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload