Let's say I have a Date object. Is there a simpler way to get the YYYY-MM-DD format than doing the following?
YYYY-MM-DD
let val = new Date(2014,1,1); console.log(val.toJSON().split('T')[0]);