Guest User

Untitled

a guest
Jan 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. // d == Mon Jan 04 2010 00:00:00 GMT+0700 (ICT)
  2. // component successfully renders
  3. const xAccessor = d => d.date;
  4.  
  5. // d == "2018-01-12T13:24:59.999Z"
  6. // component fails to render
  7. const xAccessor = function(d) {
  8. var prevDate = new Date(d.date)
  9. return prevDate.toGMTString();
  10. };
  11.  
  12. // Console gives me this when I try to convert not using fat arrow syntax
  13. // new Date("2018-01-12T13:24:59.999Z")
  14. // Fri Jan 12 2018 20:24:59 GMT+0700 (ICT)
Add Comment
Please, Sign In to add comment