From 55328ee08b7a4d79dbba6f8f03026d3f7cfc6131 Mon Sep 17 00:00:00 2001 From: Benjamin Morrison Date: Sun, 23 Jan 2022 03:28:32 -0500 Subject: including covidate day-counter --- bin/covidate | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 bin/covidate (limited to 'bin') 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);' -- cgit 1.4.1