asual/jquery-format — Issue #9: Function 'date' should not use current time
Author: arthens
Created: 2012-02-24 12:01:32+00:00
State: open

When parsing a date from a string using the function 'date', if the parsed string doesn't contain the time then the current time is used.
Example:

jQueryFormatter.date( '2012-02-22', 'yyyy-MM-dd' )

will return a date for:
2012-02-22 11:51:xx:xxx

instead of returning:
2012-02-22 00:00:00:000

This is very counter-intuitive and potentially harmful because
1. It breaks the assumption that if x = y then f(x) = f(y). Instead every run will produce a different result.
2. Users in different timezone they might end-up seeing different results even if the input data is exactly the same

I think that when the time is missing it should always be defaulted to 0 hours, 0 minutes, 0 seconds and 0 milliseconds.