Jump to content

Expiration based on today's date


Recommended Posts

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);

 

}

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...