<?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 => 'zh',
  ),
  'this' => 
  array (
    0 => 'intlcalendar.isequivalentto.php',
    1 => 'IntlCalendar::isEquivalentTo',
    2 => 'Whether another calendar is equal but for a different time',
  ),
  'up' => 
  array (
    0 => 'class.intlcalendar.php',
    1 => 'IntlCalendar',
  ),
  'prev' => 
  array (
    0 => 'intlcalendar.indaylighttime.php',
    1 => 'IntlCalendar::inDaylightTime',
  ),
  'next' => 
  array (
    0 => 'intlcalendar.islenient.php',
    1 => 'IntlCalendar::isLenient',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/intl/intlcalendar/isequivalentto.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="intlcalendar.isequivalentto" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">IntlCalendar::isEquivalentTo</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::isEquivalentTo</span> &mdash; <span class="dc-title">Whether another calendar is equal but for a different time</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-intlcalendar.isequivalentto-description">
  <h3 class="title">说明</h3>
  <p class="para">
   面向对象风格
  </p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>IntlCalendar::isEquivalentTo</strong></span>(<span class="methodparam"><span class="type"><a href="class.intlcalendar.php" class="type IntlCalendar">IntlCalendar</a></span> <code class="parameter">$other</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   过程化风格
  </p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>intlcal_is_equivalent_to</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="methodparam"><span class="type"><a href="class.intlcalendar.php" class="type IntlCalendar">IntlCalendar</a></span> <code class="parameter">$other</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Returns whether this and the given object are equivalent for all purposes
   except as to the time they have set. The locales do not have to match, as
   long as no change in behavior results from such mismatch. This includes the <a href="intlcalendar.gettimezone.php" class="link">timezone</a>, whether
   the <a href="intlcalendar.islenient.php" class="link">lenient mode</a> is set,
   the <a href="intlcalendar.getrepeatedwalltimeoption.php" class="link">repeated</a>
   and <a href="intlcalendar.getskippedwalltimeoption.php" class="link">skipped</a> wall time settings,
   the <a href="intlcalendar.getdayofweektype.php" class="link">days of the week when the
   weekend starts and ceases</a> and the <a href="intlcalendar.getweekendtransition.php" class="link">times where such transitions
   occur</a>. It may also include other calendar specific settings, such as
   the Gregorian/Julian transition instant.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-intlcalendar.isequivalentto-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt><code class="parameter">calendar</code></dt>
    <dd>
     <p class="para"><span class="classname"><a href="class.intlcalendar.php" class="classname">IntlCalendar</a></span> 实例。</p>
    </dd>
   
   
    <dt><code class="parameter">other</code></dt>
    <dd>
     <p class="para">
      The other calendar against which the comparison is to be made.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-intlcalendar.isequivalentto-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Assuming there are no argument errors, returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the calendars are
   equivalent except possibly for their set time.
  </p>
 </div>



 <div class="refsect1 examples" id="refsect1-intlcalendar.isequivalentto-examples">
  <h3 class="title">示例</h3>
  <p class="para">
   <div class="example" id="example-1">
   <p><strong>示例 #1 <span class="function"><strong>IntlCalendar::isEquivalentTo()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$cal1 </span><span style="color: #007700">= </span><span style="color: #0000BB">IntlCalendar</span><span style="color: #007700">::</span><span style="color: #0000BB">createInstance</span><span style="color: #007700">(</span><span style="color: #DD0000">'Europe/Lisbon'</span><span style="color: #007700">, </span><span style="color: #DD0000">'pt_PT'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$cal2 </span><span style="color: #007700">= </span><span style="color: #0000BB">IntlCalendar</span><span style="color: #007700">::</span><span style="color: #0000BB">createInstance</span><span style="color: #007700">(</span><span style="color: #DD0000">'Europe/Lisbon'</span><span style="color: #007700">, </span><span style="color: #DD0000">'es_ES'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$cal2</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clear</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal1</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">isEquivalentTo</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal2</span><span style="color: #007700">)); </span><span style="color: #FF8000">// true<br /><br /></span><span style="color: #0000BB">$cal3 </span><span style="color: #007700">= </span><span style="color: #0000BB">IntlCalendar</span><span style="color: #007700">::</span><span style="color: #0000BB">createInstance</span><span style="color: #007700">(</span><span style="color: #DD0000">'Europe/Lisbon'</span><span style="color: #007700">, </span><span style="color: #DD0000">'en_US'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal1</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">isEquivalentTo</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal3</span><span style="color: #007700">)); </span><span style="color: #FF8000">// false<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$cal1</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getFirstDayOfWeek</span><span style="color: #007700">(),    </span><span style="color: #FF8000">// 2 (Monday)<br /></span><span style="color: #0000BB">$cal3</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getFirstDayOfWeek</span><span style="color: #007700">());            </span><span style="color: #FF8000">// 1 (Sunday)</span></span></code></div>
    </div>

    <div class="example-contents"><p>以上示例会输出：</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">bool(true)
bool(false)
int(2)
int(1)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-intlcalendar.isequivalentto-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="intlcalendar.equals.php" class="methodname" rel="rdfs-seeAlso">IntlCalendar::equals()</a> - Compare time of two IntlCalendar objects for equality</span></li>
   </ul>
  </p>
 </div>


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