JavaScript Date.UTC() with a month off by one

It’s like they say – there are two difficult things in Computer Science: naming things, invaliding cache, and off-by-one errors.  Today I came across a weird issue with JavaScript’s Date.UTC() shifting the month by one.  The day and year were fine, but the month was off by one.  Interesting, considering that the date was parsed from a standard MySQL date (like 2013-07-12).   Well, another thing they say: when all else fails, read the manual.  And that’s where the solution is:

Parameters

  • year: A year after 1900.
  • month: An integer between 0 and 11 representing the month.
  • date: An integer between 1 and 31 representing the day of the month.

Fun.

Women are the new leading demographic in technology

These stats are all from the last year’s article, but they are interesting non-the-less – I don’t think that much have changed since.

Let me break out the categories where women are leading tech adoption:

  • Internet usage
  • Mobile phone voice usage
  • Mobile phone location-based services
  • Text messaging
  • Skype
  • Every social networking site aside from LinkedIn
  • All Internet-enabled devices
  • E-readers
  • Health-care devices
  • GPS

Also, because women still are the primary caretakers of children in many places, guess who controls which gadgets the young male and female members of the family get to purchase or even use?

Via this Slashdot post.