util.isDate(obj)
The content in this help topic pertains to SuiteScript 2.0.
Method Description |
Returns true if the |
Returns |
boolean |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2016.1 |
Parameters
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
obj |
Object | Primitive |
required |
Object for which you want to verify the type. |
2016.1 |
Syntax
The following code snippet shows the syntax for this member. It is not a functional example. For a full script sample, see N/util Module Script Sample.
//Add additional code
...
var todaysDate = new Date();
util.isDate(todaysDate); // returns true
util.isDate(new Date()); // returns true
var today = "September 28, 2015";
util.isDate(today); // returns false
...
//Add additional code