UNPKG

@auth/core

Version:

Authentication for the Web.

9 lines (8 loc) 302 B
/** * Takes a number in seconds and returns the date in the future. * Optionally takes a second date parameter. In that case * the date in the future will be calculated from that date instead of now. */ export function fromDate(time, date = Date.now()) { return new Date(date + time * 1000); }