UNPKG

alapa

Version:

A cutting-edge web development framework designed to revolutionize the way developers build modern web applications.

13 lines (12 loc) 579 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatDate = formatDate; const dayjs_1 = __importDefault(require("dayjs")); const advancedFormat_1 = __importDefault(require("dayjs/plugin/advancedFormat")); dayjs_1.default.extend(advancedFormat_1.default); function formatDate(dateString, format) { return (0, dayjs_1.default)(dateString.toString()).format(format ?? "dddd, MMMM Do, YYYY h:mm A"); }