You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
473 B
18 lines
473 B
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;
|