Justin du Coeur (jducoeur) wrote,
Justin du Coeur
jducoeur

Sometimes, I really think programmers shouldn't be allowed to write APIs

Now here's a delightful little recipe for bugs:
When creating Date objects, remember that the month parameter in the constructor is zero-based.
So December 1, 2009 is "new Date(2009, 11, 1)". Intuitive, no?
Tags: programming
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 26 comments