Formats for Converting Dates to Local Date Strings
JavaScript supports several date formats and ways to create a date. After you create a date, you can convert it to a local date string. In SuiteScript 2.0, the default format for the converted date string is the long format. In SuiteScript 2.1, the default format for the converted date string is the short format.
|
Scenario |
SuiteScript 2.0 Behavior |
SuiteScript 2.1 Behavior |
|---|---|---|
|
Create a date and log two different formats for that date:
|
The default format is the long format, and additional properties passed are ignored. The output is:
|
The default format is the short format, and additional properties passed are ignored. The output is:
|