PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

IntlCalendar::isWeekend - Whether a certain date/time is in the weekend | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

IntlCalendar::isWeekend

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

IntlCalendar::isWeekendWhether a certain date/time is in the weekend

説明

オブジェクト指向型

public bool IntlCalendar::isWeekend ([ float $date = NULL ] )

手続き型

bool intlcal_is_weekend ( IntlCalendar $cal [, float $date = NULL ] )

Returns whether either the obejct?s current time or the provided timestamp occur during a weekend in this object?s calendar system.

This function requires ICU 4.4 or later.

パラメータ

cal

The IntlCalendar resource.

date

An optional timestamp representing the number of milliseconds since the epoch, excluding leap seconds. If NULL, this object?s current time is used instead.

返り値

A bool indicating whether the given or this object?s time occurs in a weekend.

The value FALSE may also be returned on failure, for instance after giving a date out of bounds on non-lenient mode; use exceptions or query intl_get_error_code() to disambiguate.

例1 IntlCalendar::isWeekend()

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

$cal = new IntlGregorianCalendar(NULL'en_US');
$cal->set(2013/* July */7); // a Sunday 

var_dump($cal->isWeekend()); // true
var_dump($cal->isWeekend(strtotime('2013-07-01 00:00:00'))); // false, Monday

$cal = new IntlGregorianCalendar(NULL'ar_SA');
$cal->set(2013/* July */7); // a Sunday 
var_dump($cal->isWeekend()); // false, Sunday not in weekend in this calendar

参考


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「IntlCalendar::isWeekend - Whether a certain date/time is in the weekend」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | IntlCalendar::isWeekend - Whether a certain date/time is in the weekend」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: