bash - How to find the difference in days between two dates? -


a="2002-20-10"
b="2003-22-11"

how find difference in days between 2 dates?

if have gnu date, allows print representation of arbitrary date (-d option). in case convert dates seconds since epoch, subtract , divide 24*3600.

or need portable way?


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -