DEV Community

Cover image for human-time-2026: Convert Timestamps to Human Time with JavaScript
jQueryScript
jQueryScript

Posted on

human-time-2026: Convert Timestamps to Human Time with JavaScript

human-time-2026: a JavaScript library that converts timestamps into natural relative time formats like "just now", "this morning", or "3 days ago".

Key features include zero dependencies, support for both past and future dates, context-aware formatting that detects morning/afternoon/evening periods, and universal compatibility with Node.js, Bun, Deno, and browsers.

The entire implementation weighs under 1KB. Perfect for chat apps, social feeds, and notification systems where you need human-readable time without heavy date libraries.

πŸ‘‰ Blog Post

πŸ‘‰ GitHub Repo

πŸ‘‰ Live Demo

Top comments (0)