Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

intlcal_get_error_message(3) [php man page]

INTLCAL_GET_ERROR_MESSAGE(3)						 1					      INTLCAL_GET_ERROR_MESSAGE(3)

IntlCalendar::getErrorMessage - Get last error message on the object

       Object oriented style (method):

SYNOPSIS
public string IntlCalendar::getErrorMessage (void ) DESCRIPTION
Procedural style: string intlcal_get_error_message (IntlCalendar $calendar) Returns the error message (if any) associated with the error reported by IntlCalendar.getErrorCode(3) or intlcal_get_error_code(3). If there is no associated error message, only the string representation of the name of the error constant will be returned. Otherwise, the message also includes a message set on the side of the PHP binding. PARAMETERS
o $calendar - The calendar object, on the procedural style interface. RETURN VALUES
The error message associated with last error that occurred in a function call on this object, or a string indicating the non-existance of an error. EXAMPLES
Example #1 intlcal_get_error_message(3) <?php $cal = IntlCalendar::createInstance('UTC', 'en_US'); var_dump($cal->getErrorMessage()); $cal->getWeekendTransition(IntlCalendar::DOW_WEDNESDAY); var_dump($cal->getErrorMessage()); The above example will output: string(12) "U_ZERO_ERROR" string(82) "intlcal_get_weekend_transition: Error calling ICU method: U_ILLEGAL_ARGUMENT_ERROR" PHP Documentation Group INTLCAL_GET_ERROR_MESSAGE(3)

Check Out this Related Man Page

INTLCALENDAR.GETDAYOFWEEKTYPE(3)					 1					  INTLCALENDAR.GETDAYOFWEEKTYPE(3)

IntlCalendar::getDayOfWeekType - Tell whether a day is a weekday, weekend or a day that has a transition between the two

	Object oriented style

SYNOPSIS
public int IntlCalendar::getDayOfWeekType (int $dayOfWeek) DESCRIPTION
Procedural style int intlcal_get_day_of_week_type (IntlCalendar $cal, int $dayOfWeek) Returns whether the passed day is a weekday ( IntlCalendar::DOW_TYPE_WEEKDAY), a weekend day ( IntlCalendar::DOW_TYPE_WEEKEND), a day dur- ing which a transition occurs into the weekend ( IntlCalendar::DOW_TYPE_WEEKEND_OFFSET) or a day during which the weekend ceases ( IntlCal- endar::DOW_TYPE_WEEKEND_CEASE). If the return is either IntlCalendar::DOW_TYPE_WEEKEND_OFFSET or IntlCalendar::DOW_TYPE_WEEKEND_CEASE, then IntlCalendar.getWeekendTransi- tion(3) can be called to obtain the time of the transition. This function requires ICU 4.4 or later. PARAMETERS
o $cal - The IntlCalendar resource. o $dayOfWeek - One of the constants IntlCalendar::DOW_SUNDAY, IntlCalendar::DOW_MONDAY, , IntlCalendar::DOW_SATURDAY. RETURN VALUES
Returns one of the constants IntlCalendar::DOW_TYPE_WEEKDAY, IntlCalendar::DOW_TYPE_WEEKEND, IntlCalendar::DOW_TYPE_WEEKEND_OFFSET or IntlCalendar::DOW_TYPE_WEEKEND_CEASE or FALSE on failure. EXAMPLES
Example #1 IntlCalendar.getDayOfWeekType(3) <?php foreach (array('en_US', 'ar_SA') as $locale) { echo "Locale: ", Locale::getDisplayName($locale, "en_US"), " "; $cal = IntlCalendar::createInstance('UTC', $locale); for ($i = IntlCalendar::DOW_SUNDAY; $i <= IntlCalendar::DOW_SATURDAY; $i++) { echo $i, " ", $cal->getDayOfWeekType($i), " ", $cal->getDayOfWeekType($i) >= IntlCalendar::DOW_TYPE_WEEKEND_OFFSET ? $cal->getWeekendTransition($i) : '', " "; } echo " "; } The above example will output: Locale: English (United States) 1 3 86400000 2 0 3 0 4 0 5 0 6 0 7 1 Locale: Arabic (Saudi Arabia) 1 0 2 0 3 0 4 0 5 1 6 3 86400000 7 0 PHP Documentation Group INTLCALENDAR.GETDAYOFWEEKTYPE(3)
Man Page