The timestamp to be formatted, in milliseconds.
Optional
formatter: stringOptional. A specific format string to format the date. Defaults to 'YYYY-MM-DD HH:mm:ss'.
The formatted date string.
Throws an error if the timestamp is invalid or out of range.
const timestamp = new Date().getTime();
const formattedDate = formatDateByTimeStamp(timestamp);
console.log(formattedDate);
Formats a date based on a given timestamp.