From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 6cfda69 1/2: Add support for dealing with decoded time structures Date: Wed, 31 Jul 2019 23:31:35 +0300 Message-ID: <87imriymhk.fsf@tcd.ie> References: <20190729122247.28663.99759@vcs0.savannah.gnu.org> <20190729122257.00600207F5@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="147962"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Lars Ingebrigtsen To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 31 22:32:23 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hsvGp-000cMd-Ct for ged-emacs-devel@m.gmane.org; Wed, 31 Jul 2019 22:32:23 +0200 Original-Received: from localhost ([::1]:44184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsvGo-0001j8-Bz for ged-emacs-devel@m.gmane.org; Wed, 31 Jul 2019 16:32:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59270) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsvGF-0001fY-ET for emacs-devel@gnu.org; Wed, 31 Jul 2019 16:31:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsvGE-0007ic-H6 for emacs-devel@gnu.org; Wed, 31 Jul 2019 16:31:47 -0400 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:34699) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hsvGD-0007hZ-VO for emacs-devel@gnu.org; Wed, 31 Jul 2019 16:31:46 -0400 Original-Received: by mail-wr1-x42c.google.com with SMTP id 31so71118948wrm.1 for ; Wed, 31 Jul 2019 13:31:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version; bh=5mWvWMJYyVl+yWfLJwmwPlsT1vrL7MSrxaiprYislNo=; b=hR8q/VT96idmLVJrEqKzSciYI+BSj07xEtIjNarVFTrs5H5ynymh7gJzrSdKRReeOm 2kEWv2GcFht1eK+F4blHGhQY7ZcyJi322ZaJsjVp++1AEMspzbh6m8BlaudRHb7BkdpB PJHWteI3dAROU6Dhp1fTVfPLM1q2j8d7nbgiSkOjWTE/mTZIOhyKvTMBLM8fwHGLsc2O pgCAKFQ5wS1i2qJntcpv3wfVozbz6qVKxlLRKBDvn/3SwnLwWydtHWBECeoV1Htx+Eh2 76+DKTSsH8T2RAgxjP3mjIk82MdJi+hXV/rxPhhGanjR1Bx21/m+R3xRGgb3VhEwJuR2 dfaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:message-id :user-agent:mime-version; bh=5mWvWMJYyVl+yWfLJwmwPlsT1vrL7MSrxaiprYislNo=; b=Xwj8xxkOr25KI3u6a+natneYoqY+KOUqWAbXu8AcMT54iwki8KAQGpz0O3YiCeZCW6 xyXXgDNgLNplwAjsFSgbutUiU7xMwJgtLo5JmoX2ZQebj8bo/fpDax3ggEOYmrrAt/sg Hv2aYA2jKA/awKdIY9nSa0tsogRvARjmb7qgHCrjqQaUm827V8xYx/yNWjXW2JVBjmKt 4KC7hqy7N5Rl27SqNX9Y60VCYXj5LBtLpXBQ8Gr5qR8jARbILDe/og14XO94b3ZUO/+2 gbwKbzt4Ws8z0eUbB4SfvX2Bktj+M3OvcWJC5GnPXOMR/7ipcj3QmpusmqPoXwyYVTL3 4bLQ== X-Gm-Message-State: APjAAAU8Io2nm+vBXpZL8uXmeW1VsSFlXZQA8C/g9udqRXJc2nHpHTBp lDt4yAERrLfVvZDMHVzj+44j5bUjn4mIjA== X-Google-Smtp-Source: APXvYqw+HBzVCsBowwrlLoshHXYNkXR872jdx3itRRBAw2wn5MQYr1bi+2sbAaio7Z7oLAI6xwVqhQ== X-Received: by 2002:a5d:6a52:: with SMTP id t18mr35056634wrw.178.1564605104176; Wed, 31 Jul 2019 13:31:44 -0700 (PDT) Original-Received: from localhost (adsl-131.91.140.89.tellas.gr. [91.140.89.131]) by smtp.gmail.com with ESMTPSA id l8sm140130114wrg.40.2019.07.31.13.31.43 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 31 Jul 2019 13:31:43 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239063 Archived-At: larsi@gnus.org (Lars Ingebrigtsen) writes: > branch: master > commit 6cfda69d72cb9debefc48d0d95e341d389e7303a > Author: Lars Ingebrigtsen > Commit: Lars Ingebrigtsen > > Add support for dealing with decoded time structures > [...] > --- a/lisp/calendar/time-date.el > +++ b/lisp/calendar/time-date.el > @@ -36,6 +36,9 @@ > > ;;; Code: > > +(require 'cl-lib) > +(require 'subr-x) The latter can be wrapped in eval-when-compile, right? > +(defun date-days-in-month (year month) > + "The number of days in MONTH in YEAR." > + (if (= month 2) > + (if (date-leap-year-p year) > + 29 > + 28) > + (if (memq month '(1 3 5 7 8 10 12)) > + 31 > + 30))) Doesn't this already exist as the Gregorian calendar-last-day-of-month in calendar.el? [...] Out of curiosity, where does the jurisdiction of time-date.el end and calendar.el begin? Is the former focussed more on internal timestamp handling, and the latter on the more user-facing (M D Y) format and the Calendar application? Thanks, -- Basil