# How do I check to see if date is a sunday

**URL:** <https://forums.knack.com/t/how-do-i-check-to-see-if-date-is-a-sunday/7711>\
**Category:** Get Answers\
**Created:** [February 29, 2016, 11:12pm UTC](https://forums.knack.com/t/how-do-i-check-to-see-if-date-is-a-sunday/7711 "2016-02-29T23:12:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GregEllett57403](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@GregEllett57403](https://forums.knack.com/u/GregEllett57403)\
**Post date:** [February 29, 2016, 11:12pm UTC](https://forums.knack.com/t/how-do-i-check-to-see-if-date-is-a-sunday/7711/1 "2016-02-29T23:12:05Z")

</div>

Hello,

I am trying to get a date to validate on a form by checking to see if is a Sunday:

```
$(document).on('knack-view-render.view_96', function(event, view, data) {

var d= new Date();  
var n = d.getDay();

$("#view\_96 .kn-submit input[type=submit]").on(“click”, function() {

```
if ($("#view_96-field_403").val(n==6){ 
 alert ("This is a Sunday!");
 return false;

```

}  
});
```

Is there anyone who would be willing to point me in the right direction to resolve?

Thanks!
