IntlCalendar::getFirstDayOfWeek

Get the first day of the week for the calendarʼs locale

&reftitle.description;

&style.oop;

public ``int``false```IntlCalendar::getFirstDayOfWeek`

&style.procedural;

``int``false```intlcal_get_first_day_of_week` `IntlCalendar` `calendar`

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

&reftitle.parameters;

`calendar`

- &intl.parameter.intl-calendar;
&reftitle.returnvalues;

One of the constants `IntlCalendar::DOW_SUNDAY`, `IntlCalendar::DOW_MONDAY`, …, `IntlCalendar::DOW_SATURDAY`&return.falseforfailure;.

&reftitle.examples;

### `IntlCalendar::getFirstDayOfWeek`

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

    $cal1 = IntlCalendar::createInstance(NULL, 'es_ES');
    var_dump($cal1->getFirstDayOfWeek()); // Monday
    $cal1->set(2013, 1 /* 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, 1 /* February */, 3); // a Sunday
    var_dump($cal2->get(IntlCalendar::FIELD_WEEK_OF_YEAR)); // 6

&example.outputs;

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

&reftitle.seealso;

- `IntlCalendar::setFirstDayOfWeek`