Skip to content

Date format validation #36

wants to merge 1 commit into from

4 participants

adrai commented Apr 2, 2012

I can't validate Date objects anymore...

What do you think, can this solve the problem?
Instead of checking if input isObject([object Object]), directly check if is [object Date].

adrai commented Feb 6, 2013

The relevant part is in format.js:

       if (isString(input)) {
         return input.match(/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}$/);
-      if (isObject(input)) {
-        return === '[object Date]';
-      }
-      return false;
+      return === '[object Date]';

Can this be fixed?

adrai commented Mar 14, 2013

@Baggz Can you give some feedback?

melon commented Apr 5, 2013

@adrai I came across the same problem too!Obviously, it's a mistake.

Baggz commented Apr 6, 2013

Can this be fixed?

@adrai Sure, will do.

adrai commented Apr 6, 2013

Would be really nice so I can delete my fork... :-)

adrai commented Jun 19, 2013

@Baggz what do you plan to do with this issue?

adrai commented Jul 9, 2013

@Baggz When you find a couple of minutes, please try to give your opinion to this...

tu1ly commented Jun 9, 2014

0e5ac6f - sorry it took so long :/

@tu1ly tu1ly closed this Jun 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.