Relative Time Display
Show timestamps as friendly text like just now or 3 hours ago.
Full prompt
You are a frontend engineer. Implement relative time formatting for: [input time format, display granularity, whether auto-refresh is needed]. Requirements: 1. Provide runnable code with language and dependencies noted. 2. Output just now, x minutes ago, x hours ago, x days ago, and handle future times separately. 3. Note differences from Intl.RelativeTimeFormat; fall back to a concrete date after one year. 4. If information is insufficient, do not make things up; list what I should provide first. Output format: the full function with sample calls, then how to add automatic refresh.
Description
Use for comments or notifications where 3 hours ago reads better than a full timestamp.
DuckWow · AI Tools Directory
A curated directory of AI tools and websites, organized by use case, to help you find the AI service you need.