I'm so confused....

I thought this would be cool:
isLeapYr(yr::Int64) = yr % 400 == 0  ||  (yr % 4 == 0  &&  yr % 100 != 0)
LeapDay(yr) = isLeapYr(yr) ? Date(yr,2,29) : Nullable{Date}()

lp15 = LeapDay(2015) --> Nullable{Date}()
lp16 = LeapDay(2016) --> 2016-02-29

no surprises there, but when I test the return values ...

isnull( lp15 ) --> true
isnull( lp16 ) -->  MethodError: `isnull` has no method matching isnull( 
::Date )

What IS the secret Nullable{Date} formulation?

Reply via email to