Playing around with functions and I wanted to write one to give me the number of days in a particular month
function test (inputmonth,inputyear)
test=day(date(inputyear,inputmonth,1)-1)
end function
However, no matter what I pass over, the answer is always 5.
Ie, today’s date is 6 March and test(3,2019) = 5 and test(10,2021) = 5
I cannot see why it is defaulting to today’s date?