Move the month length local function outside of the RTC constructor.