"use strict";
/**
 * Time Formatting Utilities
 *
 * Centralized date/time formatting functions.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatRelativeTime = void 0;
/**
 * Format relative time (e.g., "2h ago", "1d ago")
 */
function formatRelativeTime(date) {
    const now = Date.now();
    const diff = now - date.getTime();
    const minutes = Math.floor(diff / 60000);
    const hours = Math.floor(diff / 3600000);
    const days = Math.floor(diff / 86400000);
    if (days > 0)
        return `${days}d ago`;
    if (hours > 0)
        return `${hours}h ago`;
    if (minutes > 0)
        return `${minutes}m ago`;
    return 'just now';
}
exports.formatRelativeTime = formatRelativeTime;
//# sourceMappingURL=time.js.map