-
Notifications
You must be signed in to change notification settings - Fork 1
toDate
Yousif Al-Raheem edited this page Jan 21, 2020
·
1 revision
Outputs a date object regardless if the input is string or date object. If it is a string then it will be converted to a date object if it's valid, if it is a date object then it will be verified.
console.log(toDate("2020-02-01", "YYYY-MM-DD")); // outputs a date object set to 2020-Feb-01
Param | Type | Description |
---|---|---|
value | `string | Date` |
inputFormat | string | The input format for precision conversion, if any |