Browse Source

Fix timestamp usage

master
Tony Kovanen 9 years ago
parent
commit
b29fce99db
  1. 4
      bin/now-alias

4
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);

Loading…
Cancel
Save