{"action":"created","issue":{"url":"https://api.github.com/repos/mbostock/d3/issues/2543","labels_url":"https://api.github.com/repos/mbostock/d3/issues/2543/labels{/name}","comments_url":"https://api.github.com/repos/mbostock/d3/issues/2543/comments","events_url":"https://api.github.com/repos/mbostock/d3/issues/2543/events","html_url":"https://github.com/mbostock/d3/issues/2543","id":104249644,"number":2543,"title":"Uncaught TypeError: string.slice is not a function","user":{"login":"FallenRiteMonk","id":8779846,"avatar_url":"https://avatars.githubusercontent.com/u/8779846?v=3","gravatar_id":"","url":"https://api.github.com/users/FallenRiteMonk","html_url":"https://github.com/FallenRiteMonk","followers_url":"https://api.github.com/users/FallenRiteMonk/followers","following_url":"https://api.github.com/users/FallenRiteMonk/following{/other_user}","gists_url":"https://api.github.com/users/FallenRiteMonk/gists{/gist_id}","starred_url":"https://api.github.com/users/FallenRiteMonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FallenRiteMonk/subscriptions","organizations_url":"https://api.github.com/users/FallenRiteMonk/orgs","repos_url":"https://api.github.com/users/FallenRiteMonk/repos","events_url":"https://api.github.com/users/FallenRiteMonk/events{/privacy}","received_events_url":"https://api.github.com/users/FallenRiteMonk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-01T11:59:19Z","updated_at":"2015-11-18T18:18:31Z","closed_at":"2015-10-21T21:06:45Z","body":"Hy,\r\n\r\nI get the following error trying to format a Date:\r\n\r\n```\r\nUncaught TypeError: string.slice is not a function\r\nd3_time_parseMonthNumber @ d3.js:2770\r\nd3_time_parse @ d3.js:2556\r\nformat.parse @ d3.js:2532\r\n(anonymous function) @    My line of code:    dateaset.forEach(function(d) { \r\nmakeGraphs @    My line of code:    dateFormat.parse(d:timestamp);\r\nnotify @ queue.js:47\r\n(anonymous function) @ queue.js:39\r\n(anonymous function) @ d3.js:1991\r\nevent @ d3.js:504\r\nrespond @ d3.js:1944\r\n```\r\n\r\nWhere:\r\n\r\n```\r\nvar dateFormat = d3.time.format(\"%m/%d/%Y\");\r\n```\r\n\r\nand \r\n\r\n```\r\nd.timestamp = new Date(d.header.timestamp.long); // Outputs correct date\r\n```"},"comment":{"url":"https://api.github.com/repos/mbostock/d3/issues/comments/157808075","html_url":"https://github.com/mbostock/d3/issues/2543#issuecomment-157808075","issue_url":"https://api.github.com/repos/mbostock/d3/issues/2543","id":157808075,"user":{"login":"danieldram","id":4514000,"avatar_url":"https://avatars.githubusercontent.com/u/4514000?v=3","gravatar_id":"","url":"https://api.github.com/users/danieldram","html_url":"https://github.com/danieldram","followers_url":"https://api.github.com/users/danieldram/followers","following_url":"https://api.github.com/users/danieldram/following{/other_user}","gists_url":"https://api.github.com/users/danieldram/gists{/gist_id}","starred_url":"https://api.github.com/users/danieldram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieldram/subscriptions","organizations_url":"https://api.github.com/users/danieldram/orgs","repos_url":"https://api.github.com/users/danieldram/repos","events_url":"https://api.github.com/users/danieldram/events{/privacy}","received_events_url":"https://api.github.com/users/danieldram/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T18:18:31Z","updated_at":"2015-11-18T18:18:31Z","body":"You will also get this error if the date is not a String, ie: '20110808' <-- correct, whereas 20110808 will give you an error as it's not a string and the function cannot slice/format it."}}