When last month is not last month When you type in Linux Bash: date +%Y%m -d '1 months ago', you assume you'll get the year and month of last month. Well, for a reason that I've got yet to discover (probably very logical), not the case for today's