Tony Olivas Posted May 16, 2012 Share Posted May 16, 2012 I've built a rule to print out today's date but now I want to create an expiration date based on today's date. I want to print a new date 90 days from now. This is what I have as a rule for print date: { var months = new Array(12); months[0] = "1"; months[1] = "2"; months[2] = "3"; months[3] = "4"; months[4] = "5"; months[5] = "6"; months[6] = "7"; months[7] = "8"; months[8] = "9"; months[9] = "10"; months[10] = "11"; months[11] = "12"; var current_date = new Date(); month_value = current_date.getMonth(); day_value = current_date.getDate(); year_value = current_date.getFullYear(); return (months[month_value] + "/" + day_value + "/" + year_value); } Quote Link to comment Share on other sites More sharing options...
Tony Olivas Posted May 16, 2012 Author Share Posted May 16, 2012 I figured it out just added +3 to month. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.