Merge pull request #152 from sekmenhuseyin/master

Create convert-json-date.md
This commit is contained in:
Angelos Chalaris
2017-12-16 14:29:09 +02:00
committed by GitHub

12
snippets/json-to-date.md Normal file
View File

@ -0,0 +1,12 @@
### 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
```