11-27-2008 07:00 AM
Today is the Thanksgiving holiday in the US, and we're enjoying the day off with our families. In fact, we're enjoying it so much that we're taking tomorrow too. That means a reduced posting schedule on our sites. We'll be back to our regular schedule on Monday.
Hello,
I would like to turn off (mean no energy consumption) some servers during the weekend.
I would like to do it automatically so i thought to create macro commands to a shell client.The problem is that giving shutdown (shutdown -h now) the server(Sun X4200 M2) turn off but the fans are still... (5 Replies)
I've been searching here, and other places for a solid script that would generate a weekend log. Mainly how would I combine 24hr data for the weekend days? I've came across scripts for day, days, month, but none that selects just the weekend. Thanks for any help! (0 Replies)
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)