<?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 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.strftime.php',
    1 => 'strftime',
    2 => 'Format a local time/date according to locale settings',
  ),
  'up' => 
  array (
    0 => 'ref.datetime.php',
    1 => 'Date/Time Functions',
  ),
  'prev' => 
  array (
    0 => 'function.mktime.php',
    1 => 'mktime',
  ),
  'next' => 
  array (
    0 => 'function.strptime.php',
    1 => 'strptime',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/datetime/functions/strftime.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.strftime" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">strftime</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">strftime</span> &mdash; <span class="dc-title">Format a local time/date according to locale settings</span></p>

 </div>

 <div id="function.strftime-refsynopsisdiv">
  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function has been
<em>DEPRECATED</em> as of PHP 8.1.0. Relying on this function
is highly discouraged.</p></div>
<p class="para">
 Alternatives to this function include:
</p>

  <ul class="simplelist">
   <li><span class="function"><a href="function.date.php" class="function">date()</a></span></li>
   <li><span class="methodname"><a href="intldateformatter.format.php" class="methodname">IntlDateFormatter::format()</a></span></li>
  </ul>
 </div>

 <div class="refsect1 description" id="refsect1-function.strftime-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="attribute"><a href="class.deprecated.php">#[\Deprecated]</a> </span><br>
   <span class="methodname"><strong>strftime</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$format</code></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.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Format the time and/or date according to locale settings. Month and weekday
   names and other language-dependent strings respect the current locale set
   with <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span>.
  </p>
  <div class="warning"><strong class="warning">Warning</strong>
   <p class="para">
    Not all conversion specifiers may be supported by your C library, in which
    case they will not be supported by PHP&#039;s <span class="function"><strong>strftime()</strong></span>.
    Additionally, not all platforms support negative timestamps, so your
    date range may be limited to no earlier than the Unix epoch. This means that
    %e, %T, %R and, %D (and possibly others) - as well as dates prior to
    <code class="literal">Jan 1, 1970</code> - will not work on Windows, some Linux
    distributions, and a few other operating systems. For Windows systems, a
    complete overview of supported conversion specifiers can be found at
    <a href="http://msdn.microsoft.com/en-us/library/fe06s4ak.aspx" class="link external">&raquo;&nbsp;<abbr title="Microsoft Developer Network">MSDN</abbr></a>.
    Instead use the
    <span class="methodname"><a href="intldateformatter.format.php" class="methodname">IntlDateFormatter::format()</a></span> method.
   </p>
  </div>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.strftime-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">format</code></dt>
     <dd>
      <p class="para">
       <table class="doctable table">
        <caption><strong>The following characters are recognized in the
        <code class="parameter">format</code> parameter string</strong></caption>
        
         <thead>
          <tr>
           <th><code class="parameter">format</code></th>
           <th>Description</th>
           <th>Example returned values</th>
          </tr>

         </thead>

         <tbody class="tbody">
          <tr>
           <td style="text-align: center;"><em>Day</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%a</code></td>
           <td>An abbreviated textual representation of the day</td>
           <td><code class="literal">Sun</code> through <code class="literal">Sat</code></td>
          </tr>

          <tr>
           <td><code class="literal">%A</code></td>
           <td>A full textual representation of the day</td>
           <td><code class="literal">Sunday</code> through <code class="literal">Saturday</code></td>
          </tr>

          <tr>
           <td><code class="literal">%d</code></td>
           <td>Two-digit day of the month (with leading zeros)</td>
           <td><code class="literal">01</code> to <code class="literal">31</code></td>
          </tr>

          <tr>
           <td><code class="literal">%e</code></td>
           <td>
            Day of the month, with a space preceding single digits. Not 
            implemented as described on Windows. See below for more information.
           </td>
           <td><code class="literal"> 1</code> to <code class="literal">31</code></td>
          </tr>

          <tr>
           <td><code class="literal">%j</code></td>
           <td>Day of the year, 3 digits with leading zeros</td>
           <td><code class="literal">001</code> to <code class="literal">366</code></td>
          </tr>

          <tr>
           <td><code class="literal">%u</code></td>
           <td>ISO-8601 numeric representation of the day of the week</td>
           <td><code class="literal">1</code> (for Monday) through <code class="literal">7</code> (for Sunday)</td>
          </tr>

          <tr>
           <td><code class="literal">%w</code></td>
           <td>Numeric representation of the day of the week</td>
           <td><code class="literal">0</code> (for Sunday) through <code class="literal">6</code> (for Saturday)</td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>Week</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%U</code></td>
           <td>Week number of the given year, starting with the first
           Sunday as the first week</td>
           <td><code class="literal">13</code> (for the 13th full week of the year)</td>
          </tr>

          <tr>
           <td><code class="literal">%V</code></td>
           <td>ISO-8601:1988 week number of the given year, starting with
           the first week of the year with at least 4 weekdays, with Monday
           being the start of the week</td>
           <td><code class="literal">01</code> through <code class="literal">53</code> (where 53
           accounts for an overlapping week)</td>
          </tr>

          <tr>
           <td><code class="literal">%W</code></td>
           <td>A numeric representation of the week of the year, starting
           with the first Monday as the first week</td>
           <td><code class="literal">46</code> (for the 46th week of the year beginning
           with a Monday)</td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>Month</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%b</code></td>
           <td>Abbreviated month name, based on the locale</td>
           <td><code class="literal">Jan</code> through <code class="literal">Dec</code></td>
          </tr>

          <tr>
           <td><code class="literal">%B</code></td>
           <td>Full month name, based on the locale</td>
           <td><code class="literal">January</code> through <code class="literal">December</code></td>
          </tr>

          <tr>
           <td><code class="literal">%h</code></td>
           <td>Abbreviated month name, based on the locale (an alias of %b)</td>
           <td><code class="literal">Jan</code> through <code class="literal">Dec</code></td>
          </tr>

          <tr>
           <td><code class="literal">%m</code></td>
           <td>Two digit representation of the month</td>
           <td><code class="literal">01</code> (for January) through <code class="literal">12</code> (for December)</td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>Year</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%C</code></td>
           <td>Two digit representation of the century (year divided by 100, truncated to an integer)</td>
           <td><code class="literal">19</code> for the 20th Century</td>
          </tr>

          <tr>
           <td><code class="literal">%g</code></td>
           <td>Two digit representation of the year going by ISO-8601:1988 standards (see %V)</td>
           <td>Example: <code class="literal">09</code> for the week of January 6, 2009</td>
          </tr>

          <tr>
           <td><code class="literal">%G</code></td>
           <td>The full four-digit version of %g</td>
           <td>Example: <code class="literal">2008</code> for the week of January 3, 2009</td>
          </tr>

          <tr>
           <td><code class="literal">%y</code></td>
           <td>Two digit representation of the year</td>
           <td>Example: <code class="literal">09</code> for 2009, <code class="literal">79</code> for 1979</td>
          </tr>

          <tr>
           <td><code class="literal">%Y</code></td>
           <td>Four digit representation for the year</td>
           <td>Example: <code class="literal">2038</code></td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>Time</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%H</code></td>
           <td>Two digit representation of the hour in 24-hour format</td>
           <td><code class="literal">00</code> through <code class="literal">23</code></td>
          </tr>

          <tr>
           <td><code class="literal">%k</code></td>
           <td>Hour in 24-hour format, with a space preceding single digits</td>
           <td><code class="literal"> 0</code> through <code class="literal">23</code></td>
          </tr>

          <tr>
           <td><code class="literal">%I</code></td>
           <td>Two digit representation of the hour in 12-hour format</td>
           <td><code class="literal">01</code> through <code class="literal">12</code></td>
          </tr>

          <tr>
           <td><code class="literal">%l (lower-case &#039;L&#039;)</code></td>
           <td>Hour in 12-hour format, with a space preceding single digits</td>
           <td><code class="literal"> 1</code> through <code class="literal">12</code></td>
          </tr>

          <tr>
           <td><code class="literal">%M</code></td>
           <td>Two digit representation of the minute</td>
           <td><code class="literal">00</code> through <code class="literal">59</code></td>
          </tr>

          <tr>
           <td><code class="literal">%p</code></td>
           <td>UPPER-CASE &#039;AM&#039; or &#039;PM&#039; based on the given time</td>
           <td>Example: <code class="literal">AM</code> for 00:31,
           <code class="literal">PM</code> for 22:23. The exact result depends on the
           Operating System, and they can also return lower-case variants, or
           variants with dots (such as <code class="literal">a.m.</code>).</td>
          </tr>

          <tr>
           <td><code class="literal">%P</code></td>
           <td>lower-case &#039;am&#039; or &#039;pm&#039; based on the given time</td>
           <td>Example: <code class="literal">am</code> for 00:31,
           <code class="literal">pm</code> for 22:23. Not supported by all Operating
           Systems.</td>
          </tr>

          <tr>
           <td><code class="literal">%r</code></td>
           <td>Same as &quot;%I:%M:%S %p&quot;</td>
           <td>Example: <code class="literal">09:34:17 PM</code> for 21:34:17</td>
          </tr>

          <tr>
           <td><code class="literal">%R</code></td>
           <td>Same as &quot;%H:%M&quot;</td>
           <td>Example: <code class="literal">00:35</code> for 12:35 AM, <code class="literal">16:44</code> for 4:44 PM</td>
          </tr>

          <tr>
           <td><code class="literal">%S</code></td>
           <td>Two digit representation of the second</td>
           <td><code class="literal">00</code> through <code class="literal">59</code></td>
          </tr>

          <tr>
           <td><code class="literal">%T</code></td>
           <td>Same as &quot;%H:%M:%S&quot;</td>
           <td>Example: <code class="literal">21:34:17</code> for 09:34:17 PM</td>
          </tr>

          <tr>
           <td><code class="literal">%X</code></td>
           <td>Preferred time representation based on locale, without the date</td>
           <td>Example: <code class="literal">03:59:16</code> or <code class="literal">15:59:16</code></td>
          </tr>

          <tr>
           <td><code class="literal">%z</code></td>
           <td>The time zone offset. Not implemented as described on
           Windows. See below for more information.</td>
           <td>Example: <code class="literal">-0500</code> for US Eastern Time</td>
          </tr>

          <tr>
           <td><code class="literal">%Z</code></td>
           <td>The time zone abbreviation. Not implemented as described on
           Windows. See below for more information.</td>
           <td>Example: <code class="literal">EST</code> for Eastern Time</td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>Time and Date Stamps</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%c</code></td>
           <td>Preferred date and time stamp based on locale</td>
           <td>Example: <code class="literal">Tue Feb  5 00:45:10 2009</code> for
           February 5, 2009 at 12:45:10 AM</td>
          </tr>

          <tr>
           <td><code class="literal">%D</code></td>
           <td>Same as &quot;%m/%d/%y&quot;</td>
           <td>Example: <code class="literal">02/05/09</code> for February 5, 2009</td>
          </tr>

          <tr>
           <td><code class="literal">%F</code></td>
           <td>Same as &quot;%Y-%m-%d&quot; (commonly used in database datestamps)</td>
           <td>Example: <code class="literal">2009-02-05</code> for February 5, 2009</td>
          </tr>

          <tr>
           <td><code class="literal">%s</code></td>
           <td>Unix Epoch Time timestamp (same as the <span class="function"><a href="function.time.php" class="function">time()</a></span>
           function)</td>
           <td>Example: <code class="literal">305815200</code> for September 10, 1979 08:40:00 AM</td>
          </tr>

          <tr>
           <td><code class="literal">%x</code></td>
           <td>Preferred date representation based on locale, without the time</td>
           <td>Example: <code class="literal">02/05/09</code> for February 5, 2009</td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>Miscellaneous</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%n</code></td>
           <td>A newline character (&quot;\n&quot;)</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%t</code></td>
           <td>A Tab character (&quot;\t&quot;)</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%%</code></td>
           <td>A literal percentage character (&quot;%&quot;)</td>
           <td>---</td>
          </tr>

         </tbody>
        
       </table>

      </p>
      <div class="warning"><strong class="warning">Warning</strong>
       <p class="simpara">
        Contrary to ISO-9899:1999, Sun Solaris starts with Sunday as 1.  As a
        result, <code class="literal">%u</code> may not function as described in this
        manual.
       </p>
      </div>
      <div class="warning"><strong class="warning">Warning</strong>
       <p class="para">
        <em>Windows only:</em>
       </p>
       <p class="para">
        The <code class="literal">%e</code> modifier is not supported in the Windows
        implementation of this function. To achieve this value, the
        <code class="literal">%#d</code> modifier can be used instead. The example below
        illustrates how to write a cross platform compatible function.
       </p>
       <p class="para">
        The <code class="literal">%z</code> and <code class="literal">%Z</code> modifiers both
        return the time zone name instead of the offset or abbreviation.
       </p>
      </div>
      <div class="warning"><strong class="warning">Warning</strong>
       <p class="simpara">
        <em>macOS and musl only:</em> The <code class="literal">%P</code> modifier 
        is not supported in the macOS implementation of this function.
       </p>
      </div>
     </dd>
    

    
<dt><code class="parameter">timestamp</code></dt><dd><p class="para">
The optional <code class="parameter">timestamp</code> parameter is an
<span class="type"><a href="language.types.integer.php" class="type int">int</a></span> Unix timestamp that defaults to the current
local time if <code class="parameter">timestamp</code> is omitted or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>. In other
words, it defaults to the value of <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.strftime-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns a string formatted according <code class="parameter">format</code>
   using the given <code class="parameter">timestamp</code> or the current
   local time if no timestamp is given.  Month and weekday names and
   other language-dependent strings respect the current locale set
   with <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span>.
   The function returns <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if <code class="parameter">format</code> is empty, contains unsupported
   conversion specifiers, or if the length of the returned string would be greater than
   <code class="literal">4095</code>.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.strftime-errors">
  <h3 class="title">Errors/Exceptions</h3>
  <p class="para">
Every call to a date/time function will generate a <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong>
if the time zone is not valid. See also <span class="function"><a href="function.date-default-timezone-set.php" class="function">date_default_timezone_set()</a></span></p>
  <p class="para">
   As the output is dependent upon the underlying C library, some conversion
   specifiers are not supported. On Windows, supplying unknown conversion
   specifiers will result in 5 <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> messages and
   return <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>. On other operating systems you may not get any
   <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> messages and the output may contain the
   conversion specifiers unconverted.
  </p>
 </div>


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

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.0.0</td>
       <td>
        <code class="parameter">timestamp</code> is nullable now.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.strftime-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   This example will work if you have the respective locales installed
   in your system.
   <div class="example" id="example-1">
    <p><strong>Example #1 <span class="function"><strong>strftime()</strong></span> locale examples</strong></p>
    <div class="example-contents">
<div class="annotation-non-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_TIME</span><span style="color: #007700">, </span><span style="color: #DD0000">"C"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%A"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_TIME</span><span style="color: #007700">, </span><span style="color: #DD0000">"fi_FI"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">" in Finnish is %A,"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_TIME</span><span style="color: #007700">, </span><span style="color: #DD0000">"fr_FR"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">" in French %A and"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_TIME</span><span style="color: #007700">, </span><span style="color: #DD0000">"de_DE"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">" in German %A.\n"</span><span style="color: #007700">);</span></span></code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-2">
    <p><strong>Example #2 ISO 8601:1988 week number example</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">/*     December 2002 / January 2003<br />ISOWk  M   Tu  W   Thu F   Sa  Su<br />----- ----------------------------<br />51     16  17  18  19  20  21  22<br />52     23  24  25  26  27  28  29<br />1      30  31   1   2   3   4   5<br />2       6   7   8   9  10  11  12<br />3      13  14  15  16  17  18  19   */<br /><br />// Outputs: 12/28/2002 - %V,%G,%Y = 52,2002,2002<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"12/28/2002 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">, </span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"12/28/2002"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Outputs: 12/30/2002 - %V,%G,%Y = 1,2003,2002<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"12/30/2002 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">, </span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"12/30/2002"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Outputs: 1/3/2003 - %V,%G,%Y = 1,2003,2003<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"1/3/2003 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"1/3/2003"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Outputs: 1/10/2003 - %V,%G,%Y = 2,2003,2003<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"1/10/2003 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"1/10/2003"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /><br /><br /></span><span style="color: #FF8000">/*     December 2004 / January 2005<br />ISOWk  M   Tu  W   Thu F   Sa  Su<br />----- ----------------------------<br />51     13  14  15  16  17  18  19<br />52     20  21  22  23  24  25  26<br />53     27  28  29  30  31   1   2<br />1       3   4   5   6   7   8   9<br />2      10  11  12  13  14  15  16   */<br /><br />// Outputs: 12/23/2004 - %V,%G,%Y = 52,2004,2004<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"12/23/2004 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"12/23/2004"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Outputs: 12/31/2004 - %V,%G,%Y = 53,2004,2004<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"12/31/2004 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"12/31/2004"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Outputs: 1/2/2005 - %V,%G,%Y = 53,2004,2005<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"1/2/2005 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"1/2/2005"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Outputs: 1/3/2005 - %V,%G,%Y = 1,2005,2005<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"1/3/2005 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"1/3/2005"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;</span></span></code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-3">
    <p><strong>Example #3 Cross platform compatible example using the <code class="literal">%e</code> modifier</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">// Jan 1: results in: '%e%1%' (%%, e, %%, %e, %%)<br /></span><span style="color: #0000BB">$format </span><span style="color: #007700">= </span><span style="color: #DD0000">'%%e%%%e%%'</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Check for Windows to find and replace the %e <br />// modifier correctly<br /></span><span style="color: #007700">if (</span><span style="color: #0000BB">strtoupper</span><span style="color: #007700">(</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">PHP_OS</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">3</span><span style="color: #007700">)) == </span><span style="color: #DD0000">'WIN'</span><span style="color: #007700">) {<br />    </span><span style="color: #0000BB">$format </span><span style="color: #007700">= </span><span style="color: #0000BB">preg_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'#(?&lt;!%)((?:%%)*)%e#'</span><span style="color: #007700">, </span><span style="color: #DD0000">'\1%#d'</span><span style="color: #007700">, </span><span style="color: #0000BB">$format</span><span style="color: #007700">);<br />}<br /><br />echo </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #0000BB">$format</span><span style="color: #007700">);</span></span></code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-4">
    <p><strong>Example #4 Display all known and unknown formats</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">// Describe the formats<br /></span><span style="color: #0000BB">$strftimeFormats </span><span style="color: #007700">= array(<br />    </span><span style="color: #DD0000">'A' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'A full textual representation of the day'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'B' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Full month name, based on the locale'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'C' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Two digit representation of the century (year divided by 100, truncated to an integer)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'D' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Same as "%m/%d/%y"'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'E' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'F' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Same as "%Y-%m-%d"'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'G' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'The full four-digit version of %g'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'H' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Two digit representation of the hour in 24-hour format'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'I' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Two digit representation of the hour in 12-hour format'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'J' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'K' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'L' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'M' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Two digit representation of the minute'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'N' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'O' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'P' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'lower-case "am" or "pm" based on the given time'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'Q' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'R' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Same as "%H:%M"'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'S' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Two digit representation of the second'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'T' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Same as "%H:%M:%S"'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'U' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Week number of the given year, starting with the first Sunday as the first week'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'V' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'ISO-8601:1988 week number of the given year, starting with the first week of the year with at least 4 weekdays, with Monday being the start of the week'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'W' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'A numeric representation of the week of the year, starting with the first Monday as the first week'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'X' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Preferred time representation based on locale, without the date'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'Y' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Four digit representation for the year'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'Z' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'The time zone offset/abbreviation option NOT given by %z (depends on operating system)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'a' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'An abbreviated textual representation of the day'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'b' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Abbreviated month name, based on the locale'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'c' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Preferred date and time stamp based on local'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'d' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Two-digit day of the month (with leading zeros)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'e' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Day of the month, with a space preceding single digits'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'f' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'g' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Two digit representation of the year going by ISO-8601:1988 standards (see %V)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'h' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Abbreviated month name, based on the locale (an alias of %b)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'i' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'j' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Day of the year, 3 digits with leading zeros'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'k' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Hour in 24-hour format, with a space preceding single digits'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'l' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Hour in 12-hour format, with a space preceding single digits'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'m' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Two digit representation of the month'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'n' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'A newline character ("\n")'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'o' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'p' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'UPPER-CASE "AM" or "PM" based on the given time'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'q' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'r' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Same as "%I:%M:%S %p"'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'s' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Unix Epoch Time timestamp'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'t' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'A Tab character ("\t")'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'u' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'ISO-8601 numeric representation of the day of the week'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'v' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'w' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Numeric representation of the day of the week'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'x' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Preferred date representation based on locale, without the time'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'y' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Two digit representation of the year'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'z' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Either the time zone offset from UTC or the abbreviation (depends on operating system)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'%' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'A literal percentage character ("%")'</span><span style="color: #007700">,<br />);<br /><br /></span><span style="color: #FF8000">// Results<br /></span><span style="color: #0000BB">$strftimeValues </span><span style="color: #007700">= array();<br /><br /></span><span style="color: #FF8000">// Evaluate the formats whilst suppressing any errors<br /></span><span style="color: #007700">foreach (</span><span style="color: #0000BB">$strftimeFormats </span><span style="color: #007700">as </span><span style="color: #0000BB">$format </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$description</span><span style="color: #007700">) {<br />    if (</span><span style="color: #0000BB">false </span><span style="color: #007700">!== (</span><span style="color: #0000BB">$value </span><span style="color: #007700">= @</span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%</span><span style="color: #007700">{</span><span style="color: #0000BB">$format</span><span style="color: #007700">}</span><span style="color: #DD0000">"</span><span style="color: #007700">))) {<br />        </span><span style="color: #0000BB">$strftimeValues</span><span style="color: #007700">[</span><span style="color: #0000BB">$format</span><span style="color: #007700">] = </span><span style="color: #0000BB">$value</span><span style="color: #007700">;<br />    }<br />}<br /><br /></span><span style="color: #FF8000">// Find the longest value<br /></span><span style="color: #0000BB">$maxValueLength </span><span style="color: #007700">= </span><span style="color: #0000BB">2 </span><span style="color: #007700">+ </span><span style="color: #0000BB">max</span><span style="color: #007700">(</span><span style="color: #0000BB">array_map</span><span style="color: #007700">(</span><span style="color: #DD0000">'strlen'</span><span style="color: #007700">, </span><span style="color: #0000BB">$strftimeValues</span><span style="color: #007700">));<br /><br /></span><span style="color: #FF8000">// Report known formats<br /></span><span style="color: #007700">foreach (</span><span style="color: #0000BB">$strftimeValues </span><span style="color: #007700">as </span><span style="color: #0000BB">$format </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$value</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">"Known format   : '</span><span style="color: #007700">{</span><span style="color: #0000BB">$format</span><span style="color: #007700">}</span><span style="color: #DD0000">' = "</span><span style="color: #007700">, </span><span style="color: #0000BB">str_pad</span><span style="color: #007700">(</span><span style="color: #DD0000">"'</span><span style="color: #007700">{</span><span style="color: #0000BB">$value</span><span style="color: #007700">}</span><span style="color: #DD0000">'"</span><span style="color: #007700">, </span><span style="color: #0000BB">$maxValueLength</span><span style="color: #007700">), </span><span style="color: #DD0000">" ( </span><span style="color: #007700">{</span><span style="color: #0000BB">$strftimeFormats</span><span style="color: #007700">[</span><span style="color: #0000BB">$format</span><span style="color: #007700">]}</span><span style="color: #DD0000"> )\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">// Report unknown formats<br /></span><span style="color: #007700">foreach (</span><span style="color: #0000BB">array_diff_key</span><span style="color: #007700">(</span><span style="color: #0000BB">$strftimeFormats</span><span style="color: #007700">, </span><span style="color: #0000BB">$strftimeValues</span><span style="color: #007700">) as </span><span style="color: #0000BB">$format </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$description</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">"Unknown format : '</span><span style="color: #007700">{</span><span style="color: #0000BB">$format</span><span style="color: #007700">}</span><span style="color: #DD0000">'   "</span><span style="color: #007700">, </span><span style="color: #0000BB">str_pad</span><span style="color: #007700">(</span><span style="color: #DD0000">' '</span><span style="color: #007700">, </span><span style="color: #0000BB">$maxValueLength</span><span style="color: #007700">), (</span><span style="color: #0000BB">$description </span><span style="color: #007700">? </span><span style="color: #DD0000">" ( </span><span style="color: #007700">{</span><span style="color: #0000BB">$description</span><span style="color: #007700">}</span><span style="color: #DD0000"> )" </span><span style="color: #007700">: </span><span style="color: #DD0000">''</span><span style="color: #007700">), </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}</span></span></code></div>
    </div>

    <div class="example-contents"><p>The above example will output
something similar to:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">Known format   : &#039;A&#039; = &#039;Friday&#039;            ( A full textual representation of the day )
Known format   : &#039;B&#039; = &#039;December&#039;          ( Full month name, based on the locale )
Known format   : &#039;H&#039; = &#039;11&#039;                ( Two digit representation of the hour in 24-hour format )
Known format   : &#039;I&#039; = &#039;11&#039;                ( Two digit representation of the hour in 12-hour format )
Known format   : &#039;M&#039; = &#039;24&#039;                ( Two digit representation of the minute )
Known format   : &#039;S&#039; = &#039;44&#039;                ( Two digit representation of the second )
Known format   : &#039;U&#039; = &#039;48&#039;                ( Week number of the given year, starting with the first Sunday as the first week )
Known format   : &#039;W&#039; = &#039;48&#039;                ( A numeric representation of the week of the year, starting with the first Monday as the first week )
Known format   : &#039;X&#039; = &#039;11:24:44&#039;          ( Preferred time representation based on locale, without the date )
Known format   : &#039;Y&#039; = &#039;2010&#039;              ( Four digit representation for the year )
Known format   : &#039;Z&#039; = &#039;GMT Standard Time&#039; ( The time zone offset/abbreviation option NOT given by %z (depends on operating system) )
Known format   : &#039;a&#039; = &#039;Fri&#039;               ( An abbreviated textual representation of the day )
Known format   : &#039;b&#039; = &#039;Dec&#039;               ( Abbreviated month name, based on the locale )
Known format   : &#039;c&#039; = &#039;12/03/10 11:24:44&#039; ( Preferred date and time stamp based on local )
Known format   : &#039;d&#039; = &#039;03&#039;                ( Two-digit day of the month (with leading zeros) )
Known format   : &#039;j&#039; = &#039;337&#039;               ( Day of the year, 3 digits with leading zeros )
Known format   : &#039;m&#039; = &#039;12&#039;                ( Two digit representation of the month )
Known format   : &#039;p&#039; = &#039;AM&#039;                ( UPPER-CASE &quot;AM&quot; or &quot;PM&quot; based on the given time )
Known format   : &#039;w&#039; = &#039;5&#039;                 ( Numeric representation of the day of the week )
Known format   : &#039;x&#039; = &#039;12/03/10&#039;          ( Preferred date representation based on locale, without the time )
Known format   : &#039;y&#039; = &#039;10&#039;                ( Two digit representation of the year )
Known format   : &#039;z&#039; = &#039;GMT Standard Time&#039; ( Either the time zone offset from UTC or the abbreviation (depends on operating system) )
Known format   : &#039;%&#039; = &#039;%&#039;                 ( A literal percentage character (&quot;%&quot;) )
Unknown format : &#039;C&#039;                       ( Two digit representation of the century (year divided by 100, truncated to an integer) )
Unknown format : &#039;D&#039;                       ( Same as &quot;%m/%d/%y&quot; )
Unknown format : &#039;E&#039;
Unknown format : &#039;F&#039;                       ( Same as &quot;%Y-%m-%d&quot; )
Unknown format : &#039;G&#039;                       ( The full four-digit version of %g )
Unknown format : &#039;J&#039;
Unknown format : &#039;K&#039;
Unknown format : &#039;L&#039;
Unknown format : &#039;N&#039;
Unknown format : &#039;O&#039;
Unknown format : &#039;P&#039;                       ( lower-case &quot;am&quot; or &quot;pm&quot; based on the given time )
Unknown format : &#039;Q&#039;
Unknown format : &#039;R&#039;                       ( Same as &quot;%H:%M&quot; )
Unknown format : &#039;T&#039;                       ( Same as &quot;%H:%M:%S&quot; )
Unknown format : &#039;V&#039;                       ( ISO-8601:1988 week number of the given year, starting with the first week of the year with at least 4 weekdays, with Monday being the start of the week )
Unknown format : &#039;e&#039;                       ( Day of the month, with a space preceding single digits )
Unknown format : &#039;f&#039;
Unknown format : &#039;g&#039;                       ( Two digit representation of the year going by ISO-8601:1988 standards (see %V) )
Unknown format : &#039;h&#039;                       ( Abbreviated month name, based on the locale (an alias of %b) )
Unknown format : &#039;i&#039;
Unknown format : &#039;k&#039;                       ( Hour in 24-hour format, with a space preceding single digits )
Unknown format : &#039;l&#039;                       ( Hour in 12-hour format, with a space preceding single digits )
Unknown format : &#039;n&#039;                       ( A newline character (&quot;\n&quot;) )
Unknown format : &#039;o&#039;
Unknown format : &#039;q&#039;
Unknown format : &#039;r&#039;                       ( Same as &quot;%I:%M:%S %p&quot; )
Unknown format : &#039;s&#039;                       ( Unix Epoch Time timestamp )
Unknown format : &#039;t&#039;                       ( A Tab character (&quot;\t&quot;) )
Unknown format : &#039;u&#039;                       ( ISO-8601 numeric representation of the day of the week )
Unknown format : &#039;v&#039;</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.strftime-notes">
  <h3 class="title">Notes</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    %G and %V, which are based on ISO 8601:1988 week numbers can
    give unexpected (albeit correct) results if the numbering system
    is not thoroughly understood.  See %V examples in this manual page.
   </span>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.strftime-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="intldateformatter.format.php" class="methodname" rel="rdfs-seeAlso">IntlDateFormatter::format()</a> - Format the date/time value as a string</span></li>
    <li><span class="methodname"><a href="datetime.format.php" class="methodname" rel="rdfs-seeAlso">DateTimeInterface::format()</a> - Returns date formatted according to given format</span></li>
    <li><a href="http://strftime.net/" class="link external">&raquo;&nbsp;Online strftime() format design tool</a></li>
    <li><span class="function"><a href="function.setlocale.php" class="function" rel="rdfs-seeAlso">setlocale()</a> - Set locale information</span></li>
    <li><span class="function"><a href="function.mktime.php" class="function" rel="rdfs-seeAlso">mktime()</a> - Get Unix timestamp for a date</span></li>
    <li><span class="function"><a href="function.strptime.php" class="function" rel="rdfs-seeAlso">strptime()</a> - Parse a time/date generated with strftime</span></li>
    <li><span class="function"><a href="function.gmstrftime.php" class="function" rel="rdfs-seeAlso">gmstrftime()</a> - Format a GMT/UTC time/date according to locale settings</span></li>
    <li><a href="http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html" class="link external">&raquo;&nbsp;Open Group specification of <span class="function"><strong>strftime()</strong></span></a></li>
   </ul>
  </p>
 </div>

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