GitHub 6521★

Get the current timestamp in seconds

JavaScript version

const ts = () => Math.floor(new Date().getTime() / 1000);

TypeScript version

const ts = (): number => Math.floor(new Date().getTime() / 1000);
Follow me on and to get more useful contents.