10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Legends,
i need to get previous day using date command.
Can you please help.
sdosanjh:/home> date +%m%d%y
011514
i tried -d '-1 day' but it is not working (5 Replies)
Discussion started by: sdosanjh
5 Replies
2. Shell Programming and Scripting
Ok, the title is confusing i know, but it is a weird question.
I have a bash script running on Centos5.8 and want to find a better way to do some date manipulation. What i am trying to do is get 3 days of files (day before, that day, and day after), concatenate the three files and pass them on... (2 Replies)
Discussion started by: oly_r
2 Replies
3. Shell Programming and Scripting
Hi,
I would like to write a script that checks if a file ('counter') was modified the previous day, if so erase its contents and write 00000000 into it.
For e.g. if the file 'counter' was last modified at 11.30pm on 24th May and the script runs at 12.15am of 25th May, it should erase it's... (1 Reply)
Discussion started by: hegdepras
1 Replies
4. Shell Programming and Scripting
Hi guys,
I had a scenario...
1. I had to get the previous days date in yyyymmdd format
2. i had to create a file with Date inthe format yyyymmdd.txt format
both are different
thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies
5. Shell Programming and Scripting
Hi All,
I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this.
My Requirment is as below:
Input for me will be 2000909(YYYYMM)
I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
3 Replies
6. Shell Programming and Scripting
Hello,
I wanted to display the month for previous day date. Like, today date is 18-Nov-2008. So the previous date is 17-Nov-2008. The output should be November.
If the today date is 1-DEC-2008, then output should be NOVEMBER.
If the today date is 1-JAN-2008, then output should be DECEMBER.... (4 Replies)
Discussion started by: govindts
4 Replies
7. Shell Programming and Scripting
How to find the first day of previous month in unix mmddyyyy format?
example : today is 07052007 (in mmddyyyy)
output sud be 06012007
thanks
mohapatra (10 Replies)
Discussion started by: mohapatra
10 Replies
8. Shell Programming and Scripting
Hi,
I am trying to modify a script which accepts date in format dd/mm/yy. I am trying to modify the script so that it retrieves the date that was 15 days earlier from today as start date. Eg.if today is 05/09/2006, the script should retrieve 21/08/2006 as start date. Is there any script/code to... (2 Replies)
Discussion started by: ritzwan0
2 Replies
9. Shell Programming and Scripting
Hi All,
I want to find the previous day's date and store that in a variable, which will be usuful for further processing.
Any help please.
Regards,
raju (4 Replies)
Discussion started by: rajus19
4 Replies
10. Shell Programming and Scripting
Hi ,
I am relatively new to unix...
Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell..
This is very urgent.
Thanks for ur help... (7 Replies)
Discussion started by: phani
7 Replies
CAL_FROM_JD(3) 1 CAL_FROM_JD(3)
cal_from_jd - Converts from Julian Day Count to a supported calendar
SYNOPSIS
array cal_from_jd (int $jd, int $calendar)
DESCRIPTION
cal_from_jd(3) converts the Julian day given in $jd into a date of the specified $calendar. Supported $calendar values are CAL_GREGORIAN,
CAL_JULIAN, CAL_JEWISH and CAL_FRENCH.
PARAMETERS
o $jd
- Julian day as integer
o $calendar
- Calendar to convert to
RETURN VALUES
Returns an array containing calendar information like month, day, year, day of week, abbreviated and full names of weekday and month and
the date in string form "month/day/year".
EXAMPLES
Example #1
cal_from_jd(3) example
<?php
$today = unixtojd(mktime(0, 0, 0, 8, 16, 2003));
print_r(cal_from_jd($today, CAL_GREGORIAN));
?>
The above example will output:
Array
(
[date] => 8/16/2003
[month] => 8
[day] => 16
[year] => 2003
[dow] => 6
[abbrevdayname] => Sat
[dayname] => Saturday
[abbrevmonth] => Aug
[monthname] => August
)
SEE ALSO
cal_to_jd(3), jdtofrench(3), jdtogregorian(3), jdtojewish(3), jdtojulian(3), jdtounix(3).
PHP Documentation Group CAL_FROM_JD(3)