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
9 lines (8 loc) • 573 B
JavaScript
/*! on-codemerge v1.3.1 @author Pavel Kuzmin @license MIT @homepage https://s00d.github.io/on-codemerge/ @repository git+https://github.com/s00d/on-codemerge.git Copyright (c) 2026 Pavel Kuzmin - Built on 2026-07-02T13:39:17.947Z */
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
};