<?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 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.unixtojd.php',
    1 => 'unixtojd',
    2 => '将 Unix 时间戳转换为儒略日数',
  ),
  'up' => 
  array (
    0 => 'ref.calendar.php',
    1 => 'Calendar 函数',
  ),
  'prev' => 
  array (
    0 => 'function.juliantojd.php',
    1 => 'juliantojd',
  ),
  'next' => 
  array (
    0 => 'book.datetime.php',
    1 => '日期/时间',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/calendar/functions/unixtojd.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.unixtojd" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">unixtojd</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">unixtojd</span> &mdash; <span class="dc-title">将 Unix 时间戳转换为儒略日数</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.unixtojd-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>unixtojd</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$timestamp</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   根据指定的 Unix <code class="parameter">timestamp</code> （自 1970 年 1 月 1 日以来的秒数）返回儒略日数。如果没有指定时间戳则返回当前日期的儒略日数。
   无论哪种方式，时间都被视为当地时间（不是 UTC）。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.unixtojd-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">timestamp</code></dt>
     <dd>
      <p class="para">
       用于转换的 unix 时间戳。
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.unixtojd-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   int 类型的儒略日数， 或者在失败时返回 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.unixtojd-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">timestamp</code> 现在可以为 null。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.unixtojd-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.jdtounix.php" class="function" rel="rdfs-seeAlso">jdtounix()</a> - 将儒略日数转换为 Unix 时间戳</span></li>
   </ul>
  </p>
 </div>

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