summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBenjamin Morrison <ben@gbmor.org>2022-01-23 03:28:32 -0500
committerBenjamin Morrison <ben@gbmor.org>2022-01-23 03:28:32 -0500
commit55328ee08b7a4d79dbba6f8f03026d3f7cfc6131 (patch)
tree672fd7e88e1c518c16e14a7b817262a97a7f9c49
parent6c99987983961e8ff4471f009b4624618533a8e7 (diff)
downloaddogfiles-55328ee08b7a4d79dbba6f8f03026d3f7cfc6131.tar.gz
including covidate day-counter
-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);'