Created
April 23, 2024 10:42
-
-
Save rlindooren/6202a79a9d40fb5dd209fc2a7e54b04f to your computer and use it in GitHub Desktop.
Linux/MacOS date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ "$OSTYPE" == "darwin"* ]]; then | |
YEAR_AGO=$(date -v-365d +"%Y-%m-%d") | |
else | |
YEAR_AGO=$(date -d "365 day ago" +"%Y-%m-%d") | |
fi | |
YEAR_AGO_ISO="${YEAR_AGO}T00:00:00" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment