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

IntlCalendar::getFirstDayOfWeek - Get the first day of the week for the calendar?s locale | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

IntlCalendar::getFirstDayOfWeek

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

IntlCalendar::getFirstDayOfWeekGet the first day of the week for the calendar?s locale

説明

オブジェクト指向型

public int IntlCalendar::getFirstDayOfWeek ( void )

手続き型

int intlcal_get_first_day_of_week ( IntlCalendar $cal )

The week day deemed to start a week, either the default value for this locale or the value set with IntlCalendar::setFirstDayOfWeek().

パラメータ

cal

The IntlCalendar resource.

返り値

One of the constants IntlCalendar::DOW_SUNDAY, IntlCalendar::DOW_MONDAY, …, IntlCalendar::DOW_SATURDAY失敗した場合に FALSE を返します.

例1 IntlCalendar::getFirstDayOfWeek()

<?php
ini_set
('date.timezone''UTC');

$cal1 IntlCalendar::createInstance(NULL'es_ES');
var_dump($cal1->getFirstDayOfWeek()); // Monday
$cal1->set(2013/* February */3); // a Sunday
var_dump($cal1->get(IntlCalendar::FIELD_WEEK_OF_YEAR)); // 5

$cal2 IntlCalendar::createInstance(NULL'en_US');
var_dump($cal2->getFirstDayOfWeek()); // Sunday
$cal2->set(2013/* February */3); // a Sunday
var_dump($cal2->get(IntlCalendar::FIELD_WEEK_OF_YEAR)); // 6

上の例の出力は以下となります。

int(2)
int(5)
int(1)
int(6)

参考


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

フォーラムで「IntlCalendar::getFirstDayOfWeek - Get the first day of the week for the calendar?s locale」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | IntlCalendar::getFirstDayOfWeek - Get the first day of the week for the calendar?s locale」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: