Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

intlcalendar.setfirstdayofweek(3) [php man page]

INTLCALENDAR.SETFIRSTDAYOFWEEK(3)					 1					 INTLCALENDAR.SETFIRSTDAYOFWEEK(3)

IntlCalendar::setFirstDayOfWeek - Set the day on which the week is deemed to start

	Object oriented style

SYNOPSIS
public bool IntlCalendar::setFirstDayOfWeek (int $dayOfWeek) DESCRIPTION
Procedural style bool intlcal_set_first_day_of_week (IntlCalendar $cal, int $dayOfWeek) Defines the day of week deemed to start the week. This affects the behavior of fields that depend on the concept of week start and end such as IntlCalendar::FIELD_WEEK_OF_YEAR and IntlCalendar::FIELD_YEAR_WOY. PARAMETERS
o $cal - The IntlCalendar resource. o $dayOfWeek - One of the constants IntlCalendar::DOW_SUNDAY, IntlCalendar::DOW_MONDAY, , IntlCalendar::DOW_SATURDAY. RETURN VALUES
Returns TRUE on success. Failure can only happen due to invalid parameters. EXAMPLES
Example #1 IntlCalendar.setFirstDayOfWeek(3) <?php ini_set('date.timezone', 'Europe/Lisbon'); ini_set('intl.default_locale', 'es_ES'); $cal = IntlCalendar::createInstance(); $cal->set(2013, 5 /* June */, 30); // A Sunday var_dump($cal->getFirstDayOfWeek()); // 2 (Monday) echo IntlDateFormatter::formatObject($cal, <<<EOD week of month : 'W' week of year : 'ww EOD ), " "; $cal->setFirstDayOfWeek(IntlCalendar::DOW_SUNDAY); echo IntlDateFormatter::formatObject($cal, <<<EOD week of month : 'W' week of year : 'ww EOD ), " "; The above example will output: int(2) local day of week: 7 week of month : 4 week of year : 26 local day of week: 1 week of month : 5 week of year : 27 PHP Documentation Group INTLCALENDAR.SETFIRSTDAYOFWEEK(3)

Check Out this Related Man Page

INTLCALENDAR.GETERRORMESSAGE(3) 					 1					   INTLCALENDAR.GETERRORMESSAGE(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 IntlCalendar.getErrorMessage(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 INTLCALENDAR.GETERRORMESSAGE(3)
Man Page

14 More Discussions You Might Find Interesting

1. HP-UX

Boot interaction

Hi All, I am the new boy on the Block with HP-UX. To get to the point, I have a Hp-ux (C200) workstation running on Hp-ux 11.x Operating System. A week ago when practicing on file access permission, I have set the permission on a directory (perhaps a file I am not sure) to 0544 and did... (19 Replies)
Discussion started by: mhossien
19 Replies

2. Shell Programming and Scripting

Getting week number of the "Monday"

Hi Friends, Can you help me with this, I would like to get the week number of the "Monday", Say if we run on first week of november it should give me output as "05" and "10" i.e it says the monday falls on 5th week of october. If we run on the second week of november it should give me "01"... (8 Replies)
Discussion started by: sbasetty
8 Replies

3. AIX

Script Keeping Track of Itself

Hi All We have a WEB Based application running on the IBM AIX server. There is a EOD Job which runs a UNIX script containing EOD Jobs. Say If any job fails then we have to explicitly comment out the jobs which were successfully executed and then re run the same. Is there any was by which we... (7 Replies)
Discussion started by: Prashantckc
7 Replies

4. UNIX for Advanced & Expert Users

unreadable

Hi, can someone explain what does this mean and why does this happen? i had this problem last week, and Unix admin said that he has to rebuild the file system. Now i am getting this error again. aaaa% ls . unreadable :mad: (7 Replies)
Discussion started by: treneryy
7 Replies

5. Shell Programming and Scripting

parsing cal cmd

:o given a date example mm dd yyyy 01 02 1999 how can your parse cal 01 1999 and find the date in the above case 02 and display what the actual day was eg s m t w t f s Thanks in advance Dragrid (7 Replies)
Discussion started by: dragrid
7 Replies

6. UNIX for Dummies Questions & Answers

Formatting a month's name

The following snippet should output the full month name and the month number: #!/bin/sh echo "Name of the month: " `date +%B` $1 The result is something like: Name of the month: May 03 whereas I want the argument $1 to be processed and returned, so that it will result in something like: Name... (12 Replies)
Discussion started by: figaro
12 Replies

7. Shell Programming and Scripting

Checking file for duplicates

Hi all, I am due to start receiving a weekly csv containing around 6 million rows. I need to do some processing on this file and then send it on elsewhere. My problem is that after week 1 the files that I will receive are likely to contain data already received in previous files and I need... (8 Replies)
Discussion started by: pxy2d1
8 Replies

8. Shell Programming and Scripting

Finding Day of the week from date

I have a problem of Finding Day of the week from date, but i need to do it within awk On SOLARIS Input:20101007(YYYYMMDD) Output:Thursday kindly provide suggestions. Thanks in advance (8 Replies)
Discussion started by: junaid.nehvi
8 Replies

9. Shell Programming and Scripting

Center output of 'cal' command in terminal

I have a function to center output in a terminal. However It only works for variables. I would like to center the output of the command 'cal' or 'cal -3' in a terminal. I have tried: center `cal` CAL=`cal`; center $CAL cal > cal.txt; center `cat cal.txt` center "`exec cal`" To no avail,... (10 Replies)
Discussion started by: AlphaLexman
10 Replies

10. AIX

Performance issue

Hi, We have 2 lpars on p6 blade. One of the lpar is having 3 core cpu with 5gb memory running sybase as database. An EOD process takes 25 min. to complete. Now we have an lpar on P7 server with entitled cpu capacity of 2 with 16 Gb memory and sybase as database. The EOD process which takes... (17 Replies)
Discussion started by: vjm
17 Replies

11. Shell Programming and Scripting

how to get 3rd week of every friday?

Legends, how do i get 3rd week of friday in every month and execute a particular script say /tmp/abc.sh ??? i think after "cal" we can traverse through using some for loop.:wall: pls help me. Dosanjh (8 Replies)
Discussion started by: sdosanjh
8 Replies

12. UNIX for Dummies Questions & Answers

Sudoers for one day per week?

I have been volunteered by my boss to be the sysadmin for our production redhat server. He asked me to tighten the security to avoid mishaps like "rm -f *" that occured not long ago. Right now, we have 53 users sudo-ing into the machine and it is an audit nightmare. I am wondering if it... (15 Replies)
Discussion started by: alan
15 Replies

13. Shell Programming and Scripting

awk equivilent of Excel WEEKNUM()

I am trying to calculate the week (Sun-Sat) number for a given date with week 01 defined as the week that ends in the new year (the week with the first Saturday of the new year). Excel WEEKNUM() calls the week containing Jan 1 the first week. Using this, I can get what I want above by... (13 Replies)
Discussion started by: Michael Stora
13 Replies

14. Shell Programming and Scripting

Extract from cal

I was trying to get 1st Sunday in a month. I tried using cal followed by awk NF=1 apparently it would give entire 1st field in that month. Any suggestions (11 Replies)
Discussion started by: penqueen
11 Replies