How to get last month’s value. Useful with Bash scripts.

LASTMONTH = $(date +%Y%m -d '1 month ago')
echo $LASTMONTH
# Output is ...
201902