aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdiary7
1 files changed, 6 insertions, 1 deletions
diff --git a/diary b/diary
index fc4bd94..b3c36f7 100755
--- a/diary
+++ b/diary
@@ -28,7 +28,12 @@ fi
pushd $diary_location > /dev/null
# Get the entry name
-entry=$(date +%Y-%m-%d)
+
+entry=$(date -d $1 +%Y-%m-%d)
+if [ $? -ne 0 ]
+then
+ entry=$(date +%Y-%m-%d)
+fi
if [ ! -f ${entry}* ]
then
echo -e "Rating: " > $entry