bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40363: date: add Julian day number output format


From: 積丹尼 Dan Jacobson
Subject: bug#40363: 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".





reply via email to

[Prev in Thread] Current Thread [Next in Thread]