Small question :
I calculate the number of days in a given month like so :
new DateTime(2018, month+1, 1).difference(new DateTime(2018,month,1)).inDays
All is working fine, februari
gives me 28
days, all months are correctly 30/31
days except for March
, which gives me 30
days instead of 31
.
Has anyone seen this before and perhaps an explanation?
Thanks.