UNPKG

@narkdown/notion-parser

Version:

Parse notion response

21 lines (17 loc) 544 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatDate = void 0; var _dateFnsTz = require("date-fns-tz"); const formatDate = (dateString, options) => { const { timeZone = 'Asia/Seoul', format: format_ = 'yyyy-MM-dd HH:mm:ss' } = options !== null && options !== void 0 ? options : {}; return (0, _dateFnsTz.format)((0, _dateFnsTz.utcToZonedTime)(new Date(dateString), timeZone), format_, { timeZone }); }; exports.formatDate = formatDate; //# sourceMappingURL=format-date.js.map