Claof

Test for a specific date - JavaScript

Dec 23rd, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var date = new Date();
  2. var year = date.getFullYear();
  3. var month = date.getMonth()+1;
  4. var day = date.getDate();
  5.  
  6. if (month==1) {
  7. if (day==31) {
  8. alert('1/31/'+year);
  9. }
  10. }
Add Comment
Please, Sign In to add comment