php-doc-en/reference/intl/intlcalendar/isequivalentto.xml
Adam Harvey fc1383edb3 Fix build errors.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@332615 c90b9560-bf6c-de11-be94-00142212c4b1
2014-01-14 06:35:41 +00:00

137 lines
3.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="intlcalendar.isequivalentto" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>IntlCalendar::isEquivalentTo</refname>
<refpurpose>Whether another calendar is equal but for a different time</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
&style.oop;
</para>
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>IntlCalendar::isEquivalentTo</methodname>
<methodparam><type>IntlCalendar</type><parameter>other</parameter></methodparam>
</methodsynopsis>
<para>
&style.procedural;
</para>
<methodsynopsis>
<type>bool</type><methodname>intlcal_is_equivalent_to</methodname>
<methodparam><type>IntlCalendar</type><parameter>cal</parameter></methodparam>
<methodparam><type>IntlCalendar</type><parameter>other</parameter></methodparam>
</methodsynopsis>
<para>
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 <link
linkend="intlcalendar.gettimezone">timezone</link>, whether
the <link linkend="intlcalendar.islenient">lenient mode</link> is set,
the <link linkend="intlcalendar.getrepeatedwalltimeoption">repeated</link>
and <link linkend="intlcalendar.getskippedwalltimeoption">skipped</link> wall time settings,
the <link linkend="intlcalendar.getdayofweektype">days of the week when the
weekend starts and ceases</link> and the <link
linkend="intlcalendar.getweekendtransition">times where such transitions
occur</link>. It may also include other calendar specific settings, such as
the Gregorian/Julian transition instant.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>cal</parameter></term>
<listitem>
<para>
The IntlCalendar resource.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>other</parameter></term>
<listitem>
<para>
The other calendar against which the comparison is to be made.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Assuming there are no argument errors, returns &true; iif the calendars are
equivalent except possibly for their set time.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>IntlCalendar::isEquivalentTo</function></title>
<programlisting role="php">
<![CDATA[
<?php
$cal1 = IntlCalendar::createInstance('Europe/Lisbon', 'pt_PT');
$cal2 = IntlCalendar::createInstance('Europe/Lisbon', 'es_ES');
$cal2->clear();
var_dump($cal1->isEquivalentTo($cal2)); // true
$cal3 = IntlCalendar::createInstance('Europe/Lisbon', 'en_US');
var_dump($cal1->isEquivalentTo($cal3)); // false
var_dump($cal1->getFirstDayOfWeek(), // 2 (Monday)
$cal3->getFirstDayOfWeek()); // 1 (Sunday)
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
bool(true)
bool(false)
int(2)
int(1)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>IntlCalendar::equals</methodname></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->