Files
30-seconds-of-code/snippets/json-to-date.md
2017-12-16 14:28:58 +02:00

13 lines
267 B
Markdown

### JSON to date
```js
cconst JsonToDate = arr =>
{
const dt = new Date(parseInt(arr.toString().substr(6)));
return dt.getDate() + '/' + dt.getMonth() + '/' + dt.getFullYear();
};
// JsonToDate(/Date(1489525200000)/) -> 15/2/2017
```