Tag: JavaScript
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.
Integrating Node.js with PHP
9 Mind-Blowing Canvas Demos
Some really nice examples of what’s possible with the modern web technologies… My favorite of the list was the tear-able cloth.