Monday, 12 March 2007

YUI madness

I love the YUI libraries.

My coworker and I have been introducing it at work for one thing and another. And I have been using it on projects in the moonlight, as they might say.

So when I stumbled on a bug in the new DataTable component (in beta), I was glad to submit a defect report and patch. The problem:

The YAHOO.widget.Column.formatDate function used date.getMonth() unmodified. Meaning that passed a date formatted string, i.e., "March 11, 2007", date.getMonth() returns "2" for "March". The API documentation for ECMAScript, or JavaScript, states that getMonth will return a number between 0 (January) and 11 (December).

Date strings passed to the DataTable Column would result in formatted dates that were nonsensical ("00/01/2000") or a month off.

The bug, and patch files, are available at the YUI SourceForge site.

Posted by caffeinated at 7:49 PM in experimental madness


[Trackback URL for this entry]

Your comment:

(not displayed)

Live Comment Preview:

« March »