A="2002-20-10" B="2003-22-11"
How to find the difference in days between two dates?
The bash way - convert the dates into %y%m%d format and then you can do this straight from the command line:
echo $(( ($(date --date="031122" +%s) - $(date --date="021020" +%s) )/(60*60*24) ))
2.1m questions
2.1m answers
60 comments
57.0k users