summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.zshrc12
1 files changed, 12 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index 689539e..1256f2a 100644
--- a/.zshrc
+++ b/.zshrc
@@ -190,3 +190,15 @@ fi
190 190
191export WECHALLUSER="drocan" 191export WECHALLUSER="drocan"
192export WECHALLTOKEN="35624-0D38B-A2F16-A98B0-5963D-6DF19" 192export WECHALLTOKEN="35624-0D38B-A2F16-A98B0-5963D-6DF19"
193
194ledgerrot() {
195 day=$(tail -n4 ~/nextcloud/ledger.ledger | grep -Eo '[0-9]{4}-[0-9]{2}-[0-9]{2}')
196 d1=$(date -d "now" +%s)
197 d2=$(date -d "$day" +%s)
198 days=$(( (d1 - d2) / 86400 ))
199 if [ "$days" -eq "0" ]; then
200 echo "you good";
201 else
202 echo "$days days";
203 fi
204}