I would like to check if the date value is a sunday or not, but the problem is that my date is on a specific format (dd/mm/yyyy -> 27/06/2017)

I use jQuery Form Validator plugin.

This is my validator for the date format:

```
$.validator.addMethod("myDateFormat", function(value, element) {
        var re = /^\d{2}\/\d{2}\/\d{4}$/;
        return (this.optional(element) && value=="") || re.test(value); });

```

And, my validator for the saturday test:

```
$.validator.addMethod("dateUsine", function(value, element) {
    var n = new Date(value);
    var w = n.getDay();
    console.log(w);
    return this.optional(element) || w == 6;
    });

```

And finally, the rules on the field:

```
rules: {
            dateusine: {
                required: true,
                myDateFormat: true,
                dateUsine: true
            },
        }

```

But it doesn't work. An idea, please ?