if you set
d
to 8/31/18
then this returns 8/32/18
. If you change the year from 18
, it just breaks.