vitmalina/w2ui — pull request #439 by GerHobbelt (2014-02-28 23:29:33+00:00)
Title: w2utils.isDate() fixed & tweaked + unit tests added

cf commit SHA-1: 89bd7a6c37fd36d8c19a77231b66efa30f31e6cb

- w2utils.isDate() fixed & tweaked: it now also accepts Date objects, next to strings.

- A series of pass/fail unit tests have been added for isDate

The intermediate step where isDate creates a new Date object is USA-centric and can confuse others; the JavaScript Date object provides an unambiguous interface where year, month and day can be entered as separate entities: the new code uses this API. It also is more strict on the date string validation for improved accuracy.