new SfDate()
A date object to keep Salesforce date literal
Members
toString
Returns literal when converted to string
Methods
(static) parseDate(str) → {Date}
Parse IS08601 date(time) formatted string and return date instance
Parameters:
Name | Type | Description |
---|---|---|
str |
String |
Returns:
- Type
- Date
(static) toDateLiteral(date) → {SfDate}
Convert JavaScript date object to ISO8601 Date format (e.g. 2012-10-31)
Parameters:
Name | Type | Description |
---|---|---|
date |
String | Number | Date | Input date |
Returns:
- Salesforce date literal with ISO8601 date format
- Type
- SfDate
(static) toDateTimeLiteral(date) → {SfDate}
Convert JavaScript date object to ISO8601 DateTime format
(e.g. 2012-10-31T12:34:56Z)
Parameters:
Name | Type | Description |
---|---|---|
date |
String | Number | Date | Input date |
Returns:
- Salesforce date literal with ISO8601 datetime format
- Type
- SfDate