function [nrDays] = days_in_month(year,month)


leapYears = 1992:4:2013;
monthLength_nly = [31 28 31 30 31 30 31 31 30 31 30 31];
monthLength_ly = [31 29 31 30 31 30 31 31 30 31 30 31];

if any(year==leapYears)
    monthLength = monthLength_ly;
else
    monthLength = monthLength_nly;
end

nrDays = monthLength(month);