Files
rabbit/src/utils/epoch.ts
Shusui MOYATANI 5474c85ace update
2023-04-29 00:22:03 +09:00

6 lines
138 B
TypeScript

export const toEpoch = (date: Date) => Math.floor(+date / 1000);
const epoch = (): number => toEpoch(new Date());
export default epoch;