[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
Re: [Emacs-diffs] master 6cfda69 1/2: Add support for dealing with decoded time structures
Wed, 31 Jul 2019 19:38:59 -0700
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
+(defun date-days-in-month (year month)
+ "The number of days in MONTH in YEAR."
+ (if (= month 2)
+ (if (date-leap-year-p year)
+ (if (memq month '(1 3 5 7 8 10 12))
Doesn't this already exist as the Gregorian calendar-last-day-of-month
Yes, apparently. (I didn't know about it.)
The two functions are not equivalent, as date-days-in-month uses astronomical
year numbering, whereas calendar-last-day-of-month uses traditional year
numbering, with no year zero.