kaue / jsonexport

{} → :page_facing_up: it's easy to convert JSON to CSV
http://kaue.github.io/jsonexport/
Apache License 2.0
247 stars 41 forks source link

The default date format includes a comma, which makes CSV output look incorrect. #15

Closed jclay closed 7 years ago

jclay commented 7 years ago

The default date handler includes a comma, which can make the CSV output look off by one or more depending on the number of dates in your object.

> var now = new Date;
> now.toLocaleString();
=> "12/3/2016, 7:06:48 PM"

// compare to
> var now = new Date;
=> "12/3/2016"

The downside is the default handler will not include time, but the user can override by configuring a custom method in options.