IntlCalendar::getWeekendTransition

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

IntlCalendar::getWeekendTransitionGet time of the day at which weekend begins or ends

说明

面向对象风格

public IntlCalendar::getWeekendTransition ( string $dayOfWeek ) : int

过程化风格

intlcal_get_weekend_transition ( IntlCalendar $cal , string $dayOfWeek ) : int

Returns the number of milliseconds after midnight at which the weekend begins or ends.

This is only applicable for days of the week for which IntlCalendar::getDayOfWeekType() returns either IntlCalendar::DOW_TYPE_WEEKEND_OFFSET or IntlCalendar::DOW_TYPE_WEEKEND_CEASE. Calling this function for other days of the week is an error condition.

This function requires ICU 4.4 or later.

参数

cal

The IntlCalendar resource.

dayOfWeek

One of the constants IntlCalendar::DOW_SUNDAY, IntlCalendar::DOW_MONDAY, …, IntlCalendar::DOW_SATURDAY.

返回值

The number of milliseconds into the day at which the weekend begins or ends 或者在失败时返回 FALSE.

范例

See example on IntlCalendar::getDayOfWeekType().

相关文章
php intlcalendar whether this objectʼs time is after that of the passed objectphp intlcalendar whether this objectʼs time is before that of the passed objectphp intlcalendar compare time of two intlcalendar objects for equalityphp intlcalendar calculate difference between given time and this objectʼs timephp intlcalendar the maximum value for a field considering the objectʼs current timephp intlcalendar the minimum value for a field considering the objectʼs current timephp intlcalendar tell whether a day is a weekday weekend or a day that has a transition between the twophp intlcalendar get number representing the current timephp intlcalendar get behavior for handling repeating wall timephp intlcalendar get behavior for handling skipped wall timephp intlcalendar get time currently represented by the objectphp intlcalendar get time of the day at which weekend begins or endsphp intlcalendar whether date/time interpretation is in lenient modephp intlcalendar whether a certain date/time is in the weekendphp intlcalendar set a time field or several common fields at oncephp intlcalendar set the day on which the week is deemed to startphp intlcalendar set whether date/time interpretation is to be lenientphp intlcalendar set behavior for handling repeating wall times at negative timezone offset transitionsphp intlcalendar set behavior for handling skipped wall times at positive timezone offset transitionsphp solrquery returns the treshold frequency at which words will be ignored which do not occur in at least this many docs
关注编程学问公众号