The perfect representation of code review karma. First you're all high and mighty, pointing out bugs in someone's date converter. Then you see their conditional statement with zero-indexed months and suddenly you're face-down in shame because your code has the exact same off-by-one errors. The universe has a way of humbling developers right after they get cocky about someone else's bugs.
That condition if(MONTH==0&&DAY==0){MONTH=11;DAY=31};
is exactly why we can't have nice things in programming. And also why we drink.