From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jude DaShiell Newsgroups: gmane.emacs.help Subject: Re: even elder races get tired of waiting Date: Sun, 21 Mar 2021 15:24:39 -0400 Message-ID: References: <87v99lr26w.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26191"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 21 20:25:58 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lO3i2-0006hU-4I for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 21 Mar 2021 20:25:58 +0100 Original-Received: from localhost ([::1]:53600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO3i1-0003m2-5K for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 21 Mar 2021 15:25:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO3gn-0003lr-Fd for help-gnu-emacs@gnu.org; Sun, 21 Mar 2021 15:24:41 -0400 Original-Received: from mailbackend.panix.com ([166.84.1.89]:19726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO3gm-000123-0p for help-gnu-emacs@gnu.org; Sun, 21 Mar 2021 15:24:41 -0400 Original-Received: from panix1.panix.com (panix1.panix.com [166.84.1.1]) by mailbackend.panix.com (Postfix) with ESMTP id 4F3SHq1tprzhJr; Sun, 21 Mar 2021 15:24:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=panix.com; s=panix; t=1616354679; bh=gLDQGlJrVc/e0gl+ll0iH/0UuR+lk1+1QBNOrimYc8Y=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=eF5cVzSOb/2ZJRpygR1uglgpofaHwIzNmh6Pt+ZwpetFl/A1wqMt00j9v3YQf4QM4 I+yE8o319jmGPRfxOCQzgR+WINdaY0FTVp6Uwl58jRdYVGYCI6SGqKTkiwrfc+4+B8 EyYkSFuZbF2ssBGipNYOS2ZlBnLUd/kgA+H1bV0M= Original-Received: by panix1.panix.com (Postfix, from userid 20712) id 4F3SHq1bDqzcbc; Sun, 21 Mar 2021 15:24:39 -0400 (EDT) Original-Received: from localhost (localhost [127.0.0.1]) by panix1.panix.com (Postfix) with ESMTP id 4F3SHq1YrCzcbV; Sun, 21 Mar 2021 15:24:39 -0400 (EDT) In-Reply-To: Received-SPF: pass client-ip=166.84.1.89; envelope-from=jdashiel@panix.com; helo=mailbackend.panix.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128486 Archived-At: Use of cal with a month number and a year number to get a weekday of a particular date can make work a little easier. This is for really long time periods and only inside the gregorian calendar constraints since outside of those constraints things get really wild as a result of compound errors. With that weekday in mind subtracting a year when you won't land in a leap year or adding a year when you won't land in a leap year, subtract or add one weekday to get the correct weekday for that date in those years. If you will land in a leap year, subtract or add two weekdays to get the correct weekday. Modulus the weekday by 7 to keep it in whichever range you prefer to use.. That can get you to the correct forest, then it's a matter of smaller subtraction or addition within a year to get you your exact length.