UNPKG

on-codemerge

Version:

A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product

8 lines (7 loc) 340 B
function a(e) { const o = new Date(e), t = Math.floor(((/* @__PURE__ */ new Date()).getTime() - o.getTime()) / 1e3); return t < 60 ? "just now" : t < 3600 ? `${Math.floor(t / 60)}m ago` : t < 86400 ? `${Math.floor(t / 3600)}h ago` : t < 604800 ? `${Math.floor(t / 86400)}d ago` : o.toLocaleDateString(); } export { a as formatDate };