No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher une fonction PHP

IntlCalendar::inDaylightTime

(PHP 5 >= 5.5.0, PHP 7, PECL >= 3.0.0a1)

IntlCalendar::inDaylightTimeWhether the objectʼs time is in Daylight Savings Time

Description

Object oriented style

public IntlCalendar::inDaylightTime ( void ) : bool

Procedural style

intlcal_in_daylight_time ( IntlCalendar $cal ) : bool

Whether, for the instant represented by this object and for this objectʼs timezone, daylight saving time is in place.

PHP: IntlCalendar::inDaylightTime - Manual Home of Manuel PHP  Contents Haut

Return Values

Returns TRUE if the date is in Daylight Savings Time, FALSE otherwise. The value FALSE may also be returned on failure, for instance after specifying invalid field values on non-lenient mode; use exceptions or query intl_get_error_code() to disambiguate.

PHP: IntlCalendar::inDaylightTime - Manual Home of Manuel PHP  Contents Haut

Examples

Example #1 IntlCalendar::inDaylightTime()

<?php
ini_set
('date.timezone''Europe/Lisbon');
ini_set('intl.default_locale''pt_PT');

$cal = new IntlGregorianCalendar(2013/* July */145631);
var_dump($cal->inDaylightTime()); // true
$cal->set(IntlCalendar::FIELD_MONTH11 /* December */);
var_dump($cal->inDaylightTime()); // false

//DST end transition on 2013-10-27 at 0200 (wall time back 1 hour)
$cal = new IntlGregorianCalendar(2013/* October */271300);

var_dump($cal->inDaylightTime()); // false (default WALLTIME_LAST)

$cal->setRepeatedWallTimeOption(IntlCalendar::WALLTIME_FIRST);
$cal->set(IntlCalendar::FIELD_HOUR_OF_DAY1); // force time recalculation
var_dump($cal->inDaylightTime()); // true

Find a PHP function
Error Infobrol

Can not display this page of the Infobrol website

Type of error (18-01)

Unknown format specifier "&"

Please try again in a few minutes…

Return to the home page




Steph