expire code....interesting
I'm using this working expire code,
function Expire()
{
// Get the current date and time
var rightNow = new Date();
// Setup End Date
var rightNow = new Date();
var beginDate = new Date("January 11, 2017 06:15:00 AM");
var endDate = new Date("January 12, 2018 11:57:00 AM");
if (rightNow < beginDate || rightNow > endDate)
{
app.alert("you are not allowed to view this doc.", 1, 0);
this.closeDoc(true)
}
}
Expire();
what I'd like to know is can I modify the endDate to expire right now when I click a button. If that can be done can someone let me know how? Thanks for your help.
PS: I know all the possible workarounds to defeat the code so please don't reveal them if you reply. I just don't want to educate those unscrupulous people looking for that kind of help.
