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

267 B

JSON to date

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