bug fixes, optimizations

made a huge mistake with the months in the first version should be fixed
now. i also think i prevented year mistakes, but i guess we'll have to
wait til 2014 to find out