humanize_duration
0.0.2, released 3 years ago by iheb.tech
Humanize a duration into a readable format across multiple languages.
What it does
Converts Duration objects into readable strings such as '6 minutes, 1 second'. It supports multiple built-in languages, custom language definitions, and fine-grained formatting options like delimiters, spacers, conjunctions, and unit selection.
AI-written summary of version 0.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display durations in a human-readable format to users
- You require multi-language support for time formatting
Skip it when
- You need complex date-time arithmetic rather than duration formatting
Strengths
- Supports multiple languages out of the box
- Allows adding custom languages and detailed formatting options like delimiters and conjunctions
Weaknesses
- Limited to duration formatting functionality
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
humanizeDuration(const Duration(milliseconds: 97320000));Alternatives
Packages that do the same job and could replace humanize_duration.
- moment_dart
Multi-purpose immutable DateTime subclass with support for multiple localizations and human-readable formats
66Compare - duration
Format and parse human‑readable durations in Dart
50Compare - iso8601_duration
A package to parse ISO 8601 duration strings.
56Compare - iso_duration_parser
Parses and formats ISO 8601 duration strings into individual duration parts.
44Compare