Posted By

badassninja on 11/15/06


Tagged

time calendar date week


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

rnrleachryan
vali29


Jump a week from another date


 / Published in: JavaScript
 

  1. function bounce() {
  2. d = document.periodsel;
  3.  
  4. var bog = new Array();
  5. bog = d.date1a.value.split("-");
  6. ra = bog[0];
  7. re = bog[1]-1;
  8. ro = bog[2];
  9.  
  10. dod = new Date(ra,re,ro);
  11. domo = dod.getMonth()+1;
  12. doda = dod.getDate()+6;
  13.  
  14. if(doda <= '9')
  15. doda = '0'+doda;
  16.  
  17. ere = dod.getFullYear()+'-'+domo+'-'+doda;
  18.  
  19. d.date1b.value = ere;
  20. return true;
  21. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jamesming on July 27, 2008

does not work

You need to login to post a comment.