2d12c8a553
Run ID: 131
9 lines
307 B
Plaintext
9 lines
307 B
Plaintext
/**
|
|
* 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: number, date = Date.now()) {
|
|
return new Date(date + time * 1000)
|
|
}
|