<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.getdate.php',
    1 => 'getdate',
    2 => 'Liefert Datums- und Zeitinformationen',
  ),
  'up' => 
  array (
    0 => 'ref.datetime.php',
    1 => 'Datum/Uhrzeit-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.date-timezone-set.php',
    1 => 'date_timezone_set',
  ),
  'next' => 
  array (
    0 => 'function.gettimeofday.php',
    1 => 'gettimeofday',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/datetime/functions/getdate.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.getdate" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">getdate</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">getdate</span> &mdash; <span class="dc-title">Liefert Datums- und Zeitinformationen</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.getdate-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>getdate</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"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">
   Gibt ein assoziatives <span class="type"><a href="language.types.array.php" class="type array">array</a></span> mit Datums- und Zeitangaben des
   angegebenen <code class="parameter">timestamp</code> zurück oder die lokal gültige
   Zeit, wenn <code class="parameter">timestamp</code> weggelassen wird oder <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> ist.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.getdate-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>

    
<dt><code class="parameter">timestamp</code></dt><dd><p class="para">
Der optionale Parameter <code class="parameter">timestamp</code> ist ein Unix-Zeitstempel
vom Typ <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>. Falls <code class="parameter">timestamp</code> nicht übergeben
wird oder <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> ist, wird die aktuelle lokale Zeit als Standardwert verwendet.
Er entspricht dann also dem Ergebnis der Funktion <span class="function"><a href="function.time.php" class="function">time()</a></span>.
</p></dd>

   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.getdate-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt ein assoziatives <span class="type"><a href="language.types.array.php" class="type Array">Array</a></span> mit Informationen zum
   <code class="parameter">timestamp</code> zurück. Die Elemente des zurückgegebenen
   assoziativen Arrays sind folgende:
  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Schlüsselelemente des zurückgegebenen assoziativen Arrays</strong></caption>
    
     <thead>
      <tr>
       <th>Key</th>
       <th>Beschreibung</th>
       <th>Mögliche Rückgabewerte</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><code class="literal">&quot;seconds&quot;</code></td>
       <td>Numerische Repräsentation der Sekunden</td>
       <td><code class="literal">0</code> bis <code class="literal">59</code></td>
      </tr>

      <tr>
       <td><code class="literal">&quot;minutes&quot;</code></td>
       <td>Numerische Repräsentation der Minuten</td>
       <td><code class="literal">0</code> bis <code class="literal">59</code></td>
      </tr>

      <tr>
       <td><code class="literal">&quot;hours&quot;</code></td>
       <td>Numerische Repräsentation der Stunden</td>
       <td><code class="literal">0</code> bis <code class="literal">23</code></td>
      </tr>

      <tr>
       <td><code class="literal">&quot;mday&quot;</code></td>
       <td>Numerische Repräsentation des Monatstags</td>
       <td><code class="literal">1</code> bis <code class="literal">31</code></td>
      </tr>

      <tr>
       <td><code class="literal">&quot;wday&quot;</code></td>
       <td>Numerische Repräsentation des Wochentags</td>
       <td><code class="literal">0</code> (für Sonntag) bis
        <code class="literal">6</code> (für Sonnabend)</td>
      </tr>

      <tr>
       <td><code class="literal">&quot;mon&quot;</code></td>
       <td>Numerische Repräsentation des Monats</td>
       <td><code class="literal">1</code> bis <code class="literal">12</code></td>
      </tr>

      <tr>
       <td><code class="literal">&quot;year&quot;</code></td>
       <td>
        Eine vollständige numerische Repräsentation der Jahreszahl (vierstellig)
       </td>
       <td>Beispiele: <code class="literal">1999</code> oder <code class="literal">2003</code></td>
      </tr>

      <tr>
       <td><code class="literal">&quot;yday&quot;</code></td>
       <td>Numerische Repräsentation des Tages des Jahres</td>
       <td><code class="literal">0</code> bis <code class="literal">365</code></td>
      </tr>

      <tr>
       <td><code class="literal">&quot;weekday&quot;</code></td>
       <td>Eine vollständige textuelle Repräsentation des Wochentags</td>
       <td><code class="literal">Sonntag</code> bis <code class="literal">Sonnabend</code></td>
      </tr>

      <tr>
       <td><code class="literal">&quot;month&quot;</code></td>
       <td>
        Eine vollständige textuelle Repräsentation des Monatsnamens, wie
        Januar oder März
       </td>
       <td><code class="literal">Januar</code> bis <code class="literal">Dezember</code></td>
      </tr>

      <tr>
       <td><code class="literal">0</code></td>
       <td>
        Sekunden seit der Unix-Epoche, ähnlich den Werten, die von der
        Funktion <span class="function"><a href="function.time.php" class="function">time()</a></span> zurückgegeben und von der Funktion
        <span class="function"><a href="function.date.php" class="function">date()</a></span> verwendet werden.
       </td>
       <td>
        Abhängig vom System, typischerweise ein Wert von
        <code class="literal">-2147483648</code> bis <code class="literal">2147483647</code>.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.getdate-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Beschreibung</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.0.0</td>
       <td>
        <code class="parameter">timestamp</code> ist jetzt nullbar.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.getdate-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>getdate()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$heute </span><span style="color: #007700">= </span><span style="color: #0000BB">getdate</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$heute</span><span style="color: #007700">);</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">Array
(
    [seconds] =&gt; 40
    [minutes] =&gt; 58
    [hours] =&gt; 21
    [mday] =&gt; 17
    [wday] =&gt; 2
    [mon] =&gt; 6
    [year] =&gt; 2003
    [yday] =&gt; 167
    [weekday] =&gt; Tuesday
    [month] =&gt; June
    [0] =&gt; 1055901520
)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.getdate-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.date.php" class="function" rel="rdfs-seeAlso">date()</a> - Formatiert einen Unix-Zeitstempel</span></li>
    <li><span class="function"><a href="function.idate.php" class="function" rel="rdfs-seeAlso">idate()</a> - Formatiert einen Teil der lokalen Zeit/des lokalen Datums als Integer</span></li>
    <li><span class="function"><a href="function.localtime.php" class="function" rel="rdfs-seeAlso">localtime()</a> - Ermittelt die lokale Zeit</span></li>
    <li><span class="function"><a href="function.time.php" class="function" rel="rdfs-seeAlso">time()</a> - Liefert den aktuellen Unix-Zeitstempel</span></li>
    <li><span class="function"><a href="function.setlocale.php" class="function" rel="rdfs-seeAlso">setlocale()</a> - Legt regionale (locale) Einstellungen fest</span></li>
   </ul>
  </p>
 </div>


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