<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.intlcalendar.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'intlcalendar.getminimaldaysinfirstweek.php',
    1 => 'IntlCalendar::getMinimalDaysInFirstWeek',
    2 => 'Obtient le nombre minimal de jours que la premi&egrave;re semaine dʼune ann&eacute;e ou dʼun mois peut avoir',
  ),
  'up' => 
  array (
    0 => 'class.intlcalendar.php',
    1 => 'IntlCalendar',
  ),
  'prev' => 
  array (
    0 => 'intlcalendar.getmaximum.php',
    1 => 'IntlCalendar::getMaximum',
  ),
  'next' => 
  array (
    0 => 'intlcalendar.getminimum.php',
    1 => 'IntlCalendar::getMinimum',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/intl/intlcalendar/getminimaldaysinfirstweek.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="intlcalendar.getminimaldaysinfirstweek" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">IntlCalendar::getMinimalDaysInFirstWeek</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7, PHP 8, PECL &gt;= 3.0.0a1)</p><p class="refpurpose"><span class="refname">IntlCalendar::getMinimalDaysInFirstWeek</span> &mdash; <span class="dc-title">Obtient le nombre minimal de jours que la première semaine dʼune année ou dʼun mois peut avoir</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-intlcalendar.getminimaldaysinfirstweek-description">
  <h3 class="title">Description</h3>
  <p class="para">
   Style orienté objet
  </p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>IntlCalendar::getMinimalDaysInFirstWeek</strong></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">
   Style procédural
  </p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>intlcal_get_minimal_days_in_first_week</strong></span>(<span class="methodparam"><span class="type"><a href="class.intlcalendar.php" class="type IntlCalendar">IntlCalendar</a></span> <code class="parameter">$calendar</code></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">
   Renvoie le plus petit nombre de jours que la première semaine dʼune année ou dʼun mois
   doit avoir dans la nouvelle année ou le nouveau mois. Par exemple, dans le calendrier grégorien, si
   cette valeur est 1, alors la première semaine de lʼannée inclura nécessairement
   le 1er janvier, tandis que si cette valeur est 7, alors la semaine avec le 1er janvier sera
   la première semaine de lʼannée seulement si le jour de la semaine pour le 1er janvier
   correspond au jour de la semaine retourné par <span class="function"><a href="intlcalendar.getfirstdayofweek.php" class="function">IntlCalendar::getFirstDayOfWeek()</a></span>; sinon ce sera
   la dernière semaine de lʼannée précédente.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-intlcalendar.getminimaldaysinfirstweek-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <dl>
   
    <dt><code class="parameter">calendar</code></dt>
    <dd>
     <p class="para">Une instance <span class="classname"><a href="class.intlcalendar.php" class="classname">IntlCalendar</a></span>.</p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-intlcalendar.getminimaldaysinfirstweek-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Un <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> représentant un numéro de jour ou <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si une erreur survient.
  </p>
 </div>



 <div class="refsect1 examples" id="refsect1-intlcalendar.getminimaldaysinfirstweek-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
   <p><strong>Exemple #1 <span class="function"><strong>IntlCalendar::getMinimalDaysInFirstWeek()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />ini_set</span><span style="color: #007700">(</span><span style="color: #DD0000">'date.timezone'</span><span style="color: #007700">, </span><span style="color: #DD0000">'UTC'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">ini_set</span><span style="color: #007700">(</span><span style="color: #DD0000">'intl.default_locale'</span><span style="color: #007700">, </span><span style="color: #DD0000">'en_US'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$cal </span><span style="color: #007700">= new </span><span style="color: #0000BB">IntlGregorianCalendar</span><span style="color: #007700">(</span><span style="color: #0000BB">2013</span><span style="color: #007700">, </span><span style="color: #0000BB">0 </span><span style="color: #FF8000">/* January */</span><span style="color: #007700">, </span><span style="color: #0000BB">2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlDateFormatter</span><span style="color: #007700">::</span><span style="color: #0000BB">formatObject</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">, </span><span style="color: #DD0000">'cccc'</span><span style="color: #007700">)); </span><span style="color: #FF8000">// Mercredi<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getMinimalDaysInFirstWeek</span><span style="color: #007700">(), </span><span style="color: #FF8000">// 1<br /></span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getFirstDayofWeek</span><span style="color: #007700">()); </span><span style="color: #FF8000">// 1 (Dimanche)<br /><br />// Semaine 1 de 2013<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlDateFormatter</span><span style="color: #007700">::</span><span style="color: #0000BB">formatObject</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">, </span><span style="color: #DD0000">"'Week 'w' of 'Y"</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setMinimalDaysInFirstWeek</span><span style="color: #007700">(</span><span style="color: #0000BB">4</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">// Toujours semaine 1 de 2013 (La 1st semaine a 5 jours dans la nouvelle année)<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlDateFormatter</span><span style="color: #007700">::</span><span style="color: #0000BB">formatObject</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">, </span><span style="color: #DD0000">"'Week 'w' of 'Y"</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">$cal</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setMinimalDaysInFirstWeek</span><span style="color: #007700">(</span><span style="color: #0000BB">6</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">// Semaine 53 de 2012<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlDateFormatter</span><span style="color: #007700">::</span><span style="color: #0000BB">formatObject</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal</span><span style="color: #007700">, </span><span style="color: #DD0000">"'Week 'w' of 'Y"</span><span style="color: #007700">));</span></span></code></div>
    </div>

    <div class="example-contents"><p>L&#039;exemple ci-dessus va afficher :</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">string(9) &quot;Wednesday&quot;
int(1)
int(1)
string(14) &quot;Week 1 of 2013&quot;
string(14) &quot;Week 1 of 2013&quot;
string(15) &quot;Week 53 of 2012&quot;</pre>
</div>
    </div>
   </div>
  </p>
 </div>



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