Linux date – display date one or two days ago

If you need to display date one or two days ago you could use the following command in the terminal:

#!/usr/bin/evn bash

echo $(date -d '-1days' +'%Y-%m-%d') $(date -d '-2days' +'%Y-%m-%d')