How to print in linux/unix bash the number of days since a specific date till now? (for example days since 23rd of June 2009 till today)!
feedback
|
|
You can use something like this:
This assumes date2 is more recent than date1. Adapted from http://www.unix.com/tips-tutorials/31944-simple-date-time-calulation-bash.html. | |||
|
feedback
|
|
I prefer languages with specialized datetime libraries for date arithmetic. For example:
| |||
|
feedback
|