For example I gave 31-dec-2020 it should return 365th I tried in bash with below but its not working.
start_of_year= "2020-01-01"
echo "enter date in yyy-mm-dd format"
read current_date
difference= `expr $current_date - $start_of_year`
echo "day of the year $difference"