'use strict';

const index = require('./index-ba857994.js');

function formatDate(timestamp, formatStr = "MMM do, yyyy") {
  if (!timestamp) {
    return false;
  }
  try {
    return index.format(typeof timestamp === "string"
      ? new Date(Date.parse(timestamp))
      : typeof timestamp === "object"
        ? (timestamp === null || timestamp === void 0 ? void 0 : timestamp.toDate)
          ? timestamp.toDate()
          : timestamp
        : parseInt(timestamp), formatStr);
  }
  catch (e) {
    console.log("Error formatting date", e);
  }
  return timestamp;
}

exports.formatDate = formatDate;
