<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.datetime.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'function.date-create.php',
    1 => 'date_create',
    2 => '新しい DateTime オブジェクトを作成する',
  ),
  'up' => 
  array (
    0 => 'ref.datetime.php',
    1 => '日付・時刻 関数',
  ),
  'prev' => 
  array (
    0 => 'function.date-add.php',
    1 => 'date_add',
  ),
  'next' => 
  array (
    0 => 'function.date-create-from-format.php',
    1 => 'date_create_from_format',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/datetime/functions/date-create.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.date-create" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">date_create</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">date_create</span> &mdash; <span class="dc-title">新しい <span class="classname"><a href="class.datetime.php" class="classname">DateTime</a></span> オブジェクトを作成する</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.date-create-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>date_create</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$datetime</code><span class="initializer"> = &quot;now&quot;</span></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="class.datetimezone.php" class="type DateTimeZone">DateTimeZone</a></span></span> <code class="parameter">$timezone</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="class.datetime.php" class="type DateTime">DateTime</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="methodname"><a href="datetime.construct.php" class="methodname">DateTime::__construct()</a></span>
   の手続き型バージョンです。
  </p>
  <p class="para">
   <span class="classname"><a href="class.datetime.php" class="classname">DateTime</a></span> のコンストラクタと異なり、
   <code class="parameter">datetime</code> に渡された文字列が不正な場合には、
   例外をスローする代わりに <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します。
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.date-create-parameters">
  <h3 class="title">パラメータ</h3>
  <p class="para">
   <a href="datetimeimmutable.construct.php" class="link">DateTimeImmutable::__construct</a> も参照ください。
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.date-create-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   新しい DateTime クラスのインスタンスを返します。失敗した場合に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.date-create-seealso">
  <h3 class="title">参考</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="datetimeimmutable.construct.php" class="methodname" rel="rdfs-seeAlso">DateTimeImmutable::__construct()</a> - 新しい DateTimeImmutable オブジェクトを返す</span></li>
   <li><span class="methodname"><a href="datetimeimmutable.createfromformat.php" class="methodname" rel="rdfs-seeAlso">DateTimeImmutable::createFromFormat()</a> - 時刻の文字列を指定されたフォーマットに従ってパースする</span></li>
   <li><span class="methodname"><a href="datetime.construct.php" class="methodname" rel="rdfs-seeAlso">DateTime::__construct()</a> - 新しい DateTime オブジェクトを返す</span></li>
  </ul>
 </div>


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