GNU bug report logs - #40363
date: add Julian day number output format

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Wed, 1 Apr 2020 01:08:02 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-coreutils <at> gnu.org
Subject: date: add Julian day number output format
Date: Wed, 01 Apr 2020 04:16:29 +0800
date(1) should add "Julian day number" or the "Astronomical day
number" (see (info "(emacs) Calendar Systems") output format.

Else for crontab(5) one must do
       # Run once per 48 hours (every other day), even across week, month, and year boundaries:
       33 22 * * *     expr $(date +\%s) / 60 / 60 / 24 \% 2 > /dev/null && echo Check the toilet tissue.

Instead of just
       33 22 * * *     expr $(date +\%J) \% 2 > /dev/null && echo Check the toilet tissue.
(assuming %J is the Julian day number.)

Currently you have day of the week, day of the month, day of the year,
seconds from second #1. Years from year #1, but no days from "day #1".




This bug report was last modified 5 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.