added 1st and last of month logic