A tiny (339B) utility for human-readable time differences between now and past or future dates.
FromNow is a lightweight JavaScript utility that converts date differences into human-readable strings like '2 years, 3 months ago'. It solves the problem of displaying relative timestamps in applications by providing a simple, configurable way to format time spans between any date and now.
JavaScript developers building web or Node.js applications that need to display user-friendly relative timestamps, such as in social media feeds, comment sections, or activity logs.
Developers choose FromNow for its minimal footprint (339B) and straightforward API, offering essential date formatting without the overhead of larger date libraries, making it ideal for performance-sensitive projects.
A tiny (339B) utility for human-readable time differences between now and past or future dates.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
At only 339 bytes minified and gzipped, it adds negligible overhead to your bundle, as emphasized in the README's key features.
Accepts any valid date string, eliminating the need for preprocessing and making integration straightforward, as shown in the API documentation.
Offers options like limiting segments with 'max', adding suffixes with 'suffix', and using 'and' for natural joins, providing fine-grained control over formatting.
A single function with intuitive configuration parameters reduces learning curve and code complexity, aligning with the project's minimalist philosophy.
The library only outputs English-like strings and lacks built-in options for internationalization or locale-specific formats, limiting its use in global applications.
It only formats time differences from the current moment to a given date, not between two arbitrary dates, which restricts functionality in scenarios like comparing past events.
Missing advanced date manipulation features such as timezone handling, duration objects, or calendar operations, requiring additional libraries for complex use cases.