Advertisement
afterlife88

Untitled

Mar 27th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   <script type="text/javascript">
  2.     function subDays(value) {
  3.       var today = new Date();
  4.       var dd = today.getDate() - value;
  5.       var mm = today.getMonth() + 1;
  6.       var yyyy = today.getFullYear();
  7.  
  8.       var day = dd + '/' + mm + '/' + yyyy;
  9.       return day;
  10.     }
  11.     //25 / 3 / 2016
  12.     console.log(subDays(2));
  13.   </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement