Skip to content
pubscout

time_ago_provider

4.2.0, released 4 years ago by an unverified publisher

Generate fuzzy timestamps like "9 minutes ago" in many languages

WASM-ready
$ flutter pub add time_ago_provider
Source repository

What it does

time_ago_provider formats DateTime objects into human‑readable relative strings. It supports a wide range of locales and offers both short and full formats.

AI-written summary of version 4.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display relative time in a UI
  • You want multi‑language support without writing your own formatter
  • You prefer a simple API with no extra dependencies

Skip it when

  • You need highly custom formatting rules or integration with state management
  • You require a fully featured date/time library with time zone handling

Strengths

  • Wide language coverage
  • Null‑safe, Dart 2.12+
  • Simple API, no code generation

Weaknesses

  • No customization of plural forms
  • Limited to relative time only

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:time_ago_provider/time_ago_provider.dart' as timeAgo;

final nineMinutesAgo = DateTime.now().subtract(Duration(minutes: 9));
print(timeAgo.format(nineMinutesAgo)); // 9 minutes ago
print(timeAgo.format(nineMinutesAgo, locale: 'de')); // vor 9 Minuten

Alternatives

Packages that do the same job and could replace time_ago_provider.

  • timeago

    Humanize dates into fuzzy timestamps like "15 minutes ago"

  • timeago_flutter

    Flutter widgets and helpers to convert dates into humanized fuzzy timestamps like '15 minutes ago'.

  • flutter_timeago_pro

    Formats nullable DateTime into human‑friendly relative or absolute timestamps.

  • get_time_ago

    Relative time formatting for Dart and Flutter supporting 22 locales and CLDR plurals.