Skip to content

Commit

Permalink
Use Template Literals (#267)
Browse files Browse the repository at this point in the history
Co-authored-by: P42 <p42@p42.ai>
Co-authored-by: Dominik Moritz <domoritz@gmail.com>
  • Loading branch information
3 people authored Dec 1, 2020
1 parent c0b6feb commit 111b907
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/flights.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function getRandomSubarray(arr, size) {
}

function formatDate(d) {
return "2001/"+d.substring(0, 2)+"/"+d.substring(2, 4)+" "+d.substring(4, 6)+":"+d.substring(6, 8);
return `2001/${d.substring(0, 2)}/${d.substring(2, 4)} ${d.substring(4, 6)}:${d.substring(6, 8)}`;
}

const flights = dl.csv('data/flights-3m.csv', {
Expand Down

0 comments on commit 111b907

Please sign in to comment.