fixed bug with 0-based month