fixed the bom/eom month calculation