[m-rev.] for review: add is_leap_year/1 and days_in_month/2

Zoltan Somogyi zoltan.somogyi at runbox.com
Sat Mar 21 01:53:08 AEDT 2026



On Fri, 20 Mar 2026 23:32:25 +1100, Julien Fischer <jfischer at opturion.com> wrote:
> On Fri, 20 Mar 2026 at 21:17, Zoltan Somogyi <zoltan.somogyi at runbox.com>
> wrote:
> > Almost all of that is good, so commit it. I don't particularly like
> > either the documentation or the implementation of the leap year test,
> > but it is easier for me to make changes and post them for review
> > than to describe them.
> 
> Committed.

My proposal is attached. The main point is to avoid nested exceptions
in the description, and making the code follow the description directly.
N mod 25 is not faster than N mod 100, so I don't see how its negative
effect on readability would be worth it.

Zoltan.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.cal
Type: application/octet-stream
Size: 3310 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260321/2c9d33da/attachment-0001.obj>


More information about the reviews mailing list