Colemar,
Thanks for your help.
I tried it and this is what has happened.
Quote:
[~/jiddvish]> ./days_between 2008-04-22 2009-04-22
./days_between: typeset: not found
./days_between: function: not found
./days_between: syntax error at line 5: `days_between=$' unexpected
[~/jiddvish]> uname -a
SunOS <server name deleted from here> 5.9 Generic_118558-35 sun4u sparc SUNW,Sun-Fire-V490
|
Franklin,
I did go through the script that you sent but I felt it is too long and big to go through for this small validation. Thanks a lot for your time and efforts though.
There is one more approach I designed myself and working on it right now.
I am creating an array that will contain number of days elapsed at the end of each month in the calendar year. Based on the month entered i can get the number of days elapsed at the end of the previous month, add it with the day of the month entered and get number of days elapsed in that year. If the difference is negative, which means the year has changed. I am hopeful that this logic will work. Once the code is ready I will paste it for others who can use it.
Thanks once again. Appreciate it really.