lua-users home
lua-l archive

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


On 03/28/2017 04:52 PM, Gé Weijers wrote:
>     local Y1 = 365
>     local Y4 = 4*Y1+1
>     local Y100 = 25 * Y4 - 1
>     local Y400 = 4 * Y100 + 1

I think it worth noting somewhere for what we need
Y<n> family. Not anyone knows peculiarities of
checking that year is leap.

(
year <y> is leap if it is
  * dividable by 4 and
    * not dividable by 100 or
  * dividable by 400
)

-- Martin