emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 6cfda69 1/2: Add support for dealing with decod


From: Lars Ingebrigtsen
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

"Basil L. Contovounesios" <address@hidden> 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 via email to

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