Edited for some clarity, handling months out of bound