.is_not_today()
A function that checks if a specified date is in the past compared to today's date.
Syntax
#fs.scripts.lib().is_not_today(date);
Parameters
date
A JavaScript Date
object. This date must be in the past.
Return
Returns a boolean.
Example
function(context, args) {
const l = #fs.scripts.lib();
const past_date = new Date('1970-01-01');
if(l.is_not_today(past_date)) {
// evaluates as true
return "This date is in the past"
} else if(l.is_not_today(new Date())){
// evaluates as false
return "Today's date, try again tomorrow."
}
}