Friday, 18 March 2016

How to make Date addition in JavaScript to get custom date ?

<html>
 <head>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js"></script>
<script>
function test(){
alert(Date.today().add(3).days());
var n = 6;
var v=n.months().fromNow();
alert(v);
}
</script>
  </head>
    <body>
      <button onClick="test()">Cheak Date addintion..</button>
   </body>
 </html>

 

it will Show as..











2 comments:

  1. We are a group of volunteers and opening a new scheme in our community. Your site offered us with valuable info to work on. You've done an impressive job and our entire community will be grateful to you.

    ReplyDelete
  2. I just couldn't leave your website before suggesting that I extremely loved the standard information a person supply for your guests? Is going to be again often in order to check out new posts

    ReplyDelete