
This is a collection of functions for working with dates.
The getDateUnixTime function returns the unix time of a date. Optionally specify the unit of time, milliseconds or seconds.
import { getDateUnixTime } from '@aracna/core';
// will log 1660232042878
console.log(getDateUnixTime('2022-08-11T15:34:02.878Z'));
// will log 16602320428
console.log(getDateUnixTime('2022-08-11T15:34:02.878Z', 's'));