Cook

Get elapsed time

const start = Date.now()
doSomeExpensiveOperation()
const end = Date.now()
const timeElapsed = end - start

Get Date-only (e.g. 2023-03-02)

new Date().toLocaleDateString()