function toISODateString(d) { function pad(n) { return n < 10 ? '0' + n : n } return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + 'Z' } function sleep(ms){ return new Promise(resolve=>{ setTimeout(resolve,ms) }) } exports.toISODateString = toISODateString; exports.sleep = sleep;