summary refs log tree commit diff stats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/covidate5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/covidate b/bin/covidate
new file mode 100755
index 0000000..67d8c48
--- /dev/null
+++ b/bin/covidate
@@ -0,0 +1,5 @@
+#!/bin/sh
+# covidate.pl
+# credit goes to jwz for this one-liner
+
+perl -e 'use Date::Parse; use POSIX; my @t = localtime; print strftime ("%a Mar ", @t) . int (1 + 0.5 + ((str2time (strftime ("%Y-%m-%d 3:00", @t)) - str2time ("2020-03-01 3:00")) /(60*60*24))) . strftime (" %X %Z 2020\n", @t);'