mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-31 00:08:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@332615 c90b9560-bf6c-de11-be94-00142212c4b1
136 lines
3.6 KiB
XML
136 lines
3.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="intlcalendar.getrepeatedwalltimeoption" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>IntlCalendar::getRepeatedWallTimeOption</refname>
|
|
<refpurpose>Get behavior for handling repeating wall time</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<para>
|
|
&style.oop;
|
|
</para>
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>int</type><methodname>IntlCalendar::getRepeatedWallTimeOption</methodname>
|
|
<void />
|
|
</methodsynopsis>
|
|
<para>
|
|
&style.procedural;
|
|
</para>
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>intlcal_get_repeated_wall_time_option</methodname>
|
|
<methodparam><type>IntlCalendar</type><parameter>cal</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Gets the current strategy for dealing with wall times that are repeated
|
|
whenever the clock is set back during dailight saving time end transitions.
|
|
The default value is <constant>IntlCalendar::WALLTIME_LAST</constant>.
|
|
</para>
|
|
<para>
|
|
This function requires ICU 4.9 or later.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>cal</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The IntlCalendar resource.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
One of the constants <constant>IntlCalendar::WALLTIME_FIRST</constant> or
|
|
<constant>IntlCalendar::WALLTIME_LAST</constant>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>IntlCalendar::getRepeatedWallTimeOption</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
ini_set('date.timezone', 'Europe/Lisbon');
|
|
ini_set('intl.default_locale', 'en_US');
|
|
ini_set('intl.error_level', E_WARNING);
|
|
|
|
//On October 27th at 0200, the clock goes back 1 hour and from GMT+01 to GMT+00
|
|
$cal = new IntlGregorianCalendar(2013, 9 /* October */, 27, 1, 30);
|
|
|
|
var_dump($cal->getRepeatedWalltimeOption()); // 0 WALLTIME_LAST
|
|
|
|
$formatter = IntlDateFormatter::create(
|
|
NULL,
|
|
IntlDateFormatter::FULL,
|
|
IntlDateFormatter::FULL,
|
|
'UTC'
|
|
);
|
|
var_dump($formatter->format($cal->getTime() / 1000.));
|
|
|
|
$cal->setRepeatedWalltimeOption(IntlCalendar::WALLTIME_FIRST);
|
|
var_dump($cal->getRepeatedWalltimeOption()); // 1 WALLTIME_FIRST
|
|
$cal->set(IntlCalendar::FIELD_HOUR_OF_DAY, 1);
|
|
|
|
var_dump($formatter->format($cal->getTime() / 1000.));
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
int(0)
|
|
string(42) "Sunday, October 27, 2013 at 1:30:00 AM GMT"
|
|
int(1)
|
|
string(43) "Sunday, October 27, 2013 at 12:30:00 AM GMT"
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><methodname>IntlCalendar::getSkippedWallTimeOption</methodname></member>
|
|
<member><methodname>IntlCalendar::setSkippedWallTimeOption</methodname></member>
|
|
<member><methodname>IntlCalendar::setRepeatedWallTimeOption</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
|
|
-->
|