From unknown Sat Jun 14 05:28:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#40363: date: add Julian day number output format Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 01 Apr 2020 01:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40363 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 40363@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158570323327942 (code B ref -1); Wed, 01 Apr 2020 01:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Apr 2020 01:07:13 +0000 Received: from localhost ([127.0.0.1]:37262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJRqb-0007Gc-B0 for submit@debbugs.gnu.org; Tue, 31 Mar 2020 21:07:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:32784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJRqZ-0007GT-Tc for submit@debbugs.gnu.org; Tue, 31 Mar 2020 21:07:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32854) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJRqX-0001Uj-NC for bug-coreutils@gnu.org; Tue, 31 Mar 2020 21:07:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.9 required=5.0 tests=BAYES_50,DATE_IN_PAST_03_06, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJRqW-00067X-52 for bug-coreutils@gnu.org; Tue, 31 Mar 2020 21:07:09 -0400 Received: from crocodile.birch.relay.mailchannels.net ([23.83.209.45]:47132) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJRqV-0005uN-Fs for bug-coreutils@gnu.org; Tue, 31 Mar 2020 21:07:08 -0400 X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 63E5410186E for ; Wed, 1 Apr 2020 01:07:04 +0000 (UTC) Received: from pdx1-sub0-mail-a81.g.dreamhost.com (100-96-6-10.trex.outbound.svc.cluster.local [100.96.6.10]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id EB999101821 for ; Wed, 1 Apr 2020 01:07:03 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Received: from pdx1-sub0-mail-a81.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.6); Wed, 01 Apr 2020 01:07:04 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@jidanni.org X-MailChannels-Auth-Id: dreamhost X-Stop-Power: 78198e0508941ede_1585703224172_4093484425 X-MC-Loop-Signature: 1585703224172:1482612191 X-MC-Ingress-Time: 1585703224172 Received: from pdx1-sub0-mail-a81.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a81.g.dreamhost.com (Postfix) with ESMTP id AD7BC7F56A for ; Tue, 31 Mar 2020 18:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=dhh/c89XWqvKkzazlOTg4/V8xuw=; b=LbHkXBm01WGrh4ln HeaeukUHPfPISRstkvvGvJTo5K94nUIOznNWwoxF3ymmwkfMExxzzfxRxX5aW2ai i4Xq8wPweotS23vkBiCxAz8GaU2J+k4xobd9sbRwDNoAG4OpfFobj91D/rONWo4M BmJzOyuVNKJajjiyPGcrI2NgK3E= Received: from jidanni.org (114-41-34-36.dynamic-ip.hinet.net [114.41.34.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by pdx1-sub0-mail-a81.g.dreamhost.com (Postfix) with ESMTPSA id 182877F625 for ; Tue, 31 Mar 2020 18:07:02 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a81 From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Date: Wed, 01 Apr 2020 04:16:29 +0800 Message-ID: <87pncsuvoi.5.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrtddugddtgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfggtgesthdtredttddtjeenucfhrhhomhepnjjnnjcuffgrnhculfgrtghosghsohhnuceojhhiuggrnhhnihesjhhiuggrnhhnihdrohhrgheqnecukfhppeduudegrdeguddrfeegrdefieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehjihgurghnnhhirdhorhhgpdhinhgvthepuddugedrgedurdefgedrfeeipdhrvghtuhhrnhdqphgrthhhpeeprehuthhfqdekreeureehiehmpfehnfhiheehsgevkeerpecuffgrnhculfgrtghosghsohhnuceojhhiuggrnhhnihesjhhiuggrnhhnihdrohhrgheqpdhmrghilhhfrhhomhepjhhiuggrnhhnihesjhhiuggrnhhnihdrohhrghdpnhhrtghpthhtohepsghughdqtghorhgvuhhtihhlshesghhnuhdrohhrgh X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.209.45 X-Spam-Score: 2.8 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: jidanni.org] 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [114.41.34.36 listed in dnsbl.sorbs.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=jidanni%40jidanni.org; ip=209.51.188.17; r=debbugs.gnu.org] 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: jidanni.org] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [114.41.34.36 listed in dnsbl.sorbs.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=jidanni%40jidanni.org;ip=209.51.188.17;r=debbugs.gnu.org] 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 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".