I'm making a program that you input the month and year, and it creates a calender for that month of that year. This is my largest project yet, and I broke it up into several source files.
cal.c
#include "cal.h"
#include <stdio.h>
main() {
int month, year;
scanf("%d %d", &month,... (3 Replies)
Hi,
I have script in unix which creates a julian date like 126 or 127
I want convert this julian date into calender date
ex : input 127
output 07/may/2007 or 07/05/2007 or 07/05/07
rgds
srikanth (6 Replies)
Hi, i;m beginner of Unix, i trying to use crontab to zip my log file automatically, below is my coding, some of the statement i don't know whether is correct or not. Pls help:)
year=`date '+%Y'`
month=`date '+%m'`
day=`date '+%d'`
day=`expr $day - 1`
case $month in
1 | 3 | 5 | 7 | 8 | 9 |... (4 Replies)
I try to find the first day of our calender. So I used this script ...
echo -n "The week of the date 01jan0001 : "
echo -n `date -d 00010101 +%A`
echo
But its shows error
bash-3.1$ sh first_day.shThe week of the date 01jan0001 : date: invalid date `00010101' (3 Replies)
Hi
I am trying to schedule a job through Autosys through UNIX on a particular day of every month (for example 20th of every month). Can some one please help me whats the command or whats the process to run on that particular day of month.
Thank you, (2 Replies)
Hi All,
Sample records
2157 91128 -rw-r----- 1 arun1 staff 93315072 Aug 23 06:44 /home/arun/my own/file_name.txt
2157 91128 -rw-r----- 1 arun1 staff 93315072 Aug 23 06:44 /home/arun/myown/file name2.txt
i want to print only user name, user group, size, date time stamp, and... (5 Replies)
Friends need assistance in getting a script either on shell or perl. Below is the situation
Taking Today's calender into consideration with Month,Day,Year current .Using that i would like give number of days to get its month,day,year for future or past calender depending on the + or - days... (8 Replies)
I have CGI Perl script that contains date column and date popup will be displayed from inline calender.
I had a html script for the same and converted the same to CGI script.
html page worked fine but no luck with CGI script.
Could anyone please look into the below script and let me know... (1 Reply)
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies
LEARN ABOUT PHP
intlcalendar.getdayofweektype
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)