Code Snippets

#!/usr/bin/env bash
set -euo pipefail

today=$(date +%F)
yesterday=$(date -d 'yesterday' +%F)
next_week=$(date -d '+7 days' +%F)

printf 'today=%s\nyesterday=%s\nnext_week=%s\n' \
    "$today" "$yesterday" "$next_week"