aboutsummaryrefslogtreecommitdiff
path: root/libexec/recit-tomorrow
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-07-14 03:40:24 +0000
committerJulio Capote <jcapote@gmail.com>2022-07-14 03:40:24 +0000
commit891f946e86f8a0911f67983d52fccacc9f8ebbad (patch)
tree36b032deb891f4adf5c047b255eb0ca6da275fef /libexec/recit-tomorrow
downloadrecit-891f946e86f8a0911f67983d52fccacc9f8ebbad.tar.gz
initial
Diffstat (limited to 'libexec/recit-tomorrow')
-rwxr-xr-xlibexec/recit-tomorrow11
1 files changed, 11 insertions, 0 deletions
diff --git a/libexec/recit-tomorrow b/libexec/recit-tomorrow
new file mode 100755
index 0000000..c5802d1
--- /dev/null
+++ b/libexec/recit-tomorrow
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+# Usage: recit tomorrow
+
+# shellcheck source=/dev/null
+source lib/loader
+
+recfile=$(load_recit)
+
+fmt_date=$(perl -e "use POSIX qw(strftime); print strftime('%Y-%m-%d', localtime(time + 86400)), qq(\n);")
+
+recsel -e "(Time >> '$fmt_date 00:00:00' && Time << '$fmt_date 23:59:59') || Time == '$fmt_date'" -t Entry "${recfile}"