title: Julian day from DateTime
body: <p>Is there a better way of converting a DateTime object to a Julian day number than something like this:</p>
  
  <pre><code>$jd = GregorianToJD( $dt-&gt;format('n'), $dt-&gt;format('j'), $dt-&gt;format('Y') );
  </code></pre>
  
  <p>I'm a bit surprised there isn't either a function to do it directly or a format specifier to print it.  Am I missing something obvious?</p>
  
  <p><strong>Edit:</strong> Many of the (somewhat sarcastic) replies below seem to be assuming the Julian day number is somehow related to the long-obsolete Julian calendar.  It isn't.  The <a href="http://en.wikipedia.org/wiki/Julian_day" rel="noreferrer">Julian day number</a> is one of the most common ways of numbering days from a fairly arbitrary epoch.  Its main use is in astronomy where it is the standard way of identifying a date.</p>