Rewritten from scratch to respect leap years properly
padding for monthes and days