diff --git a/bin/now-alias b/bin/now-alias index 84a395f..c01e1c3 100755 --- a/bin/now-alias +++ b/bin/now-alias @@ -120,11 +120,11 @@ async function run (token) { const sorted = await sort([...byTarget]); - const current = Date.now(); + const current = new Date(); const text = sorted.map(([target, _aliases]) => { const t = table(_aliases.map((_alias) => { const _url = chalk.underline(`https://${_alias.alias}`); - const time = chalk.gray(ms(current - _alias.created) + ' ago'); + const time = chalk.gray(ms(current - new Date(_alias.created)) + ' ago'); return [_alias.uid, _url, time]; }), { align: ['l', 'r', 'l'], hsep: ' '.repeat(6) }); return chalk.bold(target) + '\n\n' + indent(t, 2);