Quote:
Originally Posted by barriehie
This should get you started:
Code:
declare -i $day_of_the_year=$(date -d 'yyyy-mm-dd' +%j)
|
hi, barriehie
Sorry, May be I am missing something on this problem:
Your solution works for current year.
But, this calculation is not always in current year,
Code:
[root@www ~]# declare -i day_of_the_year=$(date -d '1970-01-01' +%j)
[root@www ~]# echo $day_of_the_year
1
any idea?
Thanks,
br,
milo