1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
10.2K views
by rich-c-2789 (17.6k points)
retagged by rich-c-2789
I need to check a date in incoming messages.  Is there a quick function for checking if the date is today?

1 Answer

0 votes

Yes.  In the code wizard there is a new function:  qie.isToday(date).  Below are the details from the code wizard:

Below is a quick example that assumes today is '04/30/2018':

qie.debug('Q: Is given date today?');

qie.debug("A: for '04/29/2018': " + qie.isToday('04/29/2018'));
qie.debug("A: for '04/30/2018': " + qie.isToday('04/30/2018'));
qie.debug("A: for '05/01/2018': " + qie.isToday('05/01/2018'));

Output:

Q: Is given date today?

A: for '04/29/2018': false
A: for '04/30/2018': true
A: for '05/01/2018': false

 

See also:

What day is it? How to use code wizard functions to compare dates in javascript?

by rich-c-2789 (17.6k points)
edited by rich-c-2789
...