all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master 6cfda69 1/2: Add support for dealing with decoded time structures
Date: Wed, 31 Jul 2019 22:48:26 +0200	[thread overview]
Message-ID: <87mugund5x.fsf@mouse.gnus.org> (raw)
In-Reply-To: <87imriymhk.fsf@tcd.ie> (Basil L. Contovounesios's message of "Wed, 31 Jul 2019 23:31:35 +0300")

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

>> +(require 'cl-lib)
>> +(require 'subr-x)
>
> The latter can be wrapped in eval-when-compile, right?

Probably...  but I think, these days, the likelihood of subr-x not being
loaded by something in your Emacs is pretty slim, so I'm not sure it's
worth wrapping those in the case where we only use macros from it.

>> +(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?

Yes, apparently.  (I didn't know about it.)

> 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?

I assumed that it's all about the Calendar application.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



  reply	other threads:[~2019-07-31 20:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190729122247.28663.99759@vcs0.savannah.gnu.org>
     [not found] ` <20190729122257.00600207F5@vcs0.savannah.gnu.org>
2019-07-30  5:19   ` master 6cfda69 1/2: Add support for dealing with decoded time structures Glenn Morris
2019-07-30 10:01     ` Lars Ingebrigtsen
2019-07-31 20:31   ` [Emacs-diffs] " Basil L. Contovounesios
2019-07-31 20:48     ` Lars Ingebrigtsen [this message]
2019-08-01  2:38       ` Paul Eggert
2019-08-01  9:35         ` Basil L. Contovounesios
2019-08-01 11:21           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mugund5x.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=contovob@tcd.ie \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.