Bash datetime

From wikinotes

WARNING:

Date is not a feature of bash, but part of the gnu or bsd coreutils. That means that it is not as portable as you might like.

date parsing

gnu-coreutils

date -d "2 days ago"
date -d "thursday"
date -d "last thursday"

bsd-coreutils

date formatting

gnu-coreutils

date '+%d/%m/%Y %H:%M:%S'  #> 01/09/2018 10:00:00

bsd-coreutils