Re:Keeping a plaintext “did” file
by chucksmash on Monday July 16, 2018 @03:29AM
(#17539403)
I've settled on a couple of helper functions in bash to accomplish a similar thing (daily journaling):
[ Parent
| on HN ]
Nitpick: here you can use a `case` instead of `if [[ ... ]] elif [[ ... ]] elif ...`:
case "$DATE" in
+*|-*)
DATE=$(date -I -d" $DATE days") ;;
tomorrow)
DATE=$(date -I -d" +1 days") ;;
yesterday)
DATE=$(date -I -d" -1 days") ;;
esac