<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.calendar.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.cal-to-jd.php',
    1 => 'cal_to_jd',
    2 => 'Converts from a supported calendar to Julian Day Count',
  ),
  'up' => 
  array (
    0 => 'ref.calendar.php',
    1 => 'Calendar Functions',
  ),
  'prev' => 
  array (
    0 => 'function.cal-info.php',
    1 => 'cal_info',
  ),
  'next' => 
  array (
    0 => 'function.easter-date.php',
    1 => 'easter_date',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/calendar/functions/cal-to-jd.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.cal-to-jd" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">cal_to_jd</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">cal_to_jd</span> &mdash; <span class="dc-title">Converts from a supported calendar to Julian Day Count</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.cal-to-jd-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>cal_to_jd</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$calendar</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$month</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$day</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$year</code></span><br>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>cal_to_jd()</strong></span> calculates the Julian day count
   for a date in the specified <code class="parameter">calendar</code>.
   Supported <code class="parameter">calendar</code>s are
   <strong><code><a href="calendar.constants.php#constant.cal-gregorian">CAL_GREGORIAN</a></code></strong>,
   <strong><code><a href="calendar.constants.php#constant.cal-julian">CAL_JULIAN</a></code></strong>,
   <strong><code><a href="calendar.constants.php#constant.cal-jewish">CAL_JEWISH</a></code></strong> and
   <strong><code><a href="calendar.constants.php#constant.cal-french">CAL_FRENCH</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.cal-to-jd-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">calendar</code></dt>
     <dd>
      <p class="para">
       Calendar to convert from, one of 
       <strong><code><a href="calendar.constants.php#constant.cal-gregorian">CAL_GREGORIAN</a></code></strong>,
       <strong><code><a href="calendar.constants.php#constant.cal-julian">CAL_JULIAN</a></code></strong>,
       <strong><code><a href="calendar.constants.php#constant.cal-jewish">CAL_JEWISH</a></code></strong> or
       <strong><code><a href="calendar.constants.php#constant.cal-french">CAL_FRENCH</a></code></strong>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">month</code></dt>
     <dd>
      <p class="para">
       The month as a number, the valid range depends 
       on the <code class="parameter">calendar</code>
      </p>
     </dd>
    
    
     <dt><code class="parameter">day</code></dt>
     <dd>
      <p class="para">
       The day as a number, the valid range depends 
       on the <code class="parameter">calendar</code>
      </p>
     </dd>
    
    
     <dt><code class="parameter">year</code></dt>
     <dd>
      <p class="para">
       The year as a number, the valid range depends 
       on the <code class="parameter">calendar</code>
      </p>
     </dd>
      
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.cal-to-jd-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   A Julian Day number.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.cal-to-jd-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.cal-from-jd.php" class="function" rel="rdfs-seeAlso">cal_from_jd()</a> - Converts from Julian Day Count to a supported calendar</span></li>
    <li><span class="function"><a href="function.frenchtojd.php" class="function" rel="rdfs-seeAlso">frenchtojd()</a> - Converts a date from the French Republican Calendar to a Julian Day Count</span></li> 
    <li><span class="function"><a href="function.gregoriantojd.php" class="function" rel="rdfs-seeAlso">gregoriantojd()</a> - Converts a Gregorian date to Julian Day Count</span></li>  
    <li><span class="function"><a href="function.jewishtojd.php" class="function" rel="rdfs-seeAlso">jewishtojd()</a> - Converts a date in the Jewish Calendar to Julian Day Count</span></li>  
    <li><span class="function"><a href="function.juliantojd.php" class="function" rel="rdfs-seeAlso">juliantojd()</a> - Converts a Julian Calendar date to Julian Day Count</span></li>  
    <li><span class="function"><a href="function.unixtojd.php" class="function" rel="rdfs-seeAlso">unixtojd()</a> - Convert Unix timestamp to Julian Day</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>