A Dart package that converts UNIX timestamps into human-readable time strings, designed to mimic YouTube's intuitive time formatting style. It simplifies displaying durations like '2 days ago' or '3 hours ago' in a user-friendly way. Ideal for apps needing clear, localized time representations without complex date logic. The package is lightweight and easy to integrate, focusing on readability and consistency across different time spans.
Use cases
- Displaying post or video upload times
- Showing relative time since an event
- Enhancing user experience with natural language timestamps
- Simplifying time display in chat or social feeds
- Formatting duration in media playback interfaces
Key features
- YouTube-style time formatting
- Simple API for UNIX timestamps
- Human-readable relative time strings
- Lightweight and dependency-free
- Supports multiple time granularities
Suitable for
- Apps with time-based content
- Social media or messaging platforms
- Video or podcast streaming apps
- User activity tracking features
- Minimalist UIs prioritizing clarity
Considerations
- Does not support localization beyond default English
- Limited to relative time formatting
- No timezone handling
- Not suitable for absolute timestamp display
- Requires manual handling of edge cases like very old dates