Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

intlcalendar.getrepeatedwalltimeoption(3) [php man page]

INTLCALENDAR.GETREPEATEDWALLTIMEOPTION(3)				 1				 INTLCALENDAR.GETREPEATEDWALLTIMEOPTION(3)

IntlCalendar::getRepeatedWallTimeOption - Get behavior for handling repeating wall time

	Object oriented style

SYNOPSIS
public int IntlCalendar::getRepeatedWallTimeOption (void ) DESCRIPTION
Procedural style int intlcal_get_repeated_wall_time_option (IntlCalendar $cal) Gets the current strategy for dealing with wall times that are repeated whenever the clock is set back during dailight saving time end transitions. The default value is IntlCalendar::WALLTIME_LAST. This function requires ICU 4.9 or later. PARAMETERS
o $cal - The IntlCalendar resource. RETURN VALUES
One of the constants IntlCalendar::WALLTIME_FIRST or IntlCalendar::WALLTIME_LAST. EXAMPLES
Example #1 IntlCalendar.getRepeatedWallTimeOption(3) <?php ini_set('date.timezone', 'Europe/Lisbon'); ini_set('intl.default_locale', 'en_US'); ini_set('intl.error_level', E_WARNING); //On October 27th at 0200, the clock goes back 1 hour and from GMT+01 to GMT+00 $cal = new IntlGregorianCalendar(2013, 9 /* October */, 27, 1, 30); var_dump($cal->getRepeatedWalltimeOption()); // 0 WALLTIME_LAST $formatter = IntlDateFormatter::create( NULL, IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'UTC' ); var_dump($formatter->format($cal->getTime() / 1000.)); $cal->setRepeatedWalltimeOption(IntlCalendar::WALLTIME_FIRST); var_dump($cal->getRepeatedWalltimeOption()); // 1 WALLTIME_FIRST $cal->set(IntlCalendar::FIELD_HOUR_OF_DAY, 1); var_dump($formatter->format($cal->getTime() / 1000.)); The above example will output: int(0) string(42) "Sunday, October 27, 2013 at 1:30:00 AM GMT" int(1) string(43) "Sunday, October 27, 2013 at 12:30:00 AM GMT" SEE ALSO
IntlCalendar::getSkippedWallTimeOption, IntlCalendar::setSkippedWallTimeOption, IntlCalendar::setRepeatedWallTimeOption. PHP Documentation Group INTLCALENDAR.GETREPEATEDWALLTIMEOPTION(3)

Check Out this Related Man Page

INTLCALENDAR.GETMINIMALDAYSINFIRSTWEEK(3)				 1				 INTLCALENDAR.GETMINIMALDAYSINFIRSTWEEK(3)

IntlCalendar::getMinimalDaysInFirstWeek - Get minimal number of days the first week in a year or month can have

	Object oriented style

SYNOPSIS
public int IntlCalendar::getMinimalDaysInFirstWeek (void ) DESCRIPTION
Procedural style int intlcal_get_minimal_days_in_first_week (IntlCalendar $cal) Returns the smallest number of days the first week of a year or month must have in the new year or month. For instance, in the Gregorian calendar, if this value is 1, then the first week of the year will necessarily include January 1st, while if this value is 7, then the week with January 1st will be the first week of the year only if the day of the week for January 1st matches the day of the week returned by IntlCalendar.getFirstDayOfWeek(3); otherwise it will be the previous years last week. PARAMETERS
o $cal - The IntlCalendar resource. RETURN VALUES
An int representing a number of days or FALSE on failure. EXAMPLES
Example #1 IntlCalendar.getMinimalDaysInFirstWeek(3) <?php ini_set('date.timezone', 'UTC'); ini_set('intl.default_locale', 'en_US'); $cal = new IntlGregorianCalendar(2013, 0 /* January */, 2); var_dump(IntlDateFormatter::formatObject($cal, 'cccc')); // Wednesday var_dump($cal->getMinimalDaysInFirstWeek(), // 1 $cal->getFirstDayofWeek()); // 1 (Sunday) // Week 1 of 2013 var_dump(IntlDateFormatter::formatObject($cal, "'Week 'w' of 'Y")); $cal->setMinimalDaysInFirstWeek(4); // Still Week 1 of 2013 (1st week has 5 days in the new year) var_dump(IntlDateFormatter::formatObject($cal, "'Week 'w' of 'Y")); $cal->setMinimalDaysInFirstWeek(6); // Week 53 of 2012 var_dump(IntlDateFormatter::formatObject($cal, "'Week 'w' of 'Y")); The above example will output: string(9) "Wednesday" int(1) int(1) string(14) "Week 1 of 2013" string(14) "Week 1 of 2013" string(15) "Week 53 of 2012" PHP Documentation Group INTLCALENDAR.GETMINIMALDAYSINFIRSTWEEK(3)
Man Page