if ((year//4 = 0) and (year//400 != 0)) then 'check the leap year
ndays[2] = 29 'then February has 29 days
else
ndays[2] = 28 'else has 28 days
endif
the above code only needs to run if month = 2

Is there any way now to test the leap year?
only the obvious , send it a few go nogo date strings and check the result