Skip to content
pubscout

smart_date_formatter

2.6.1, released 4 weeks ago by an unverified publisher

Flutter utility for formatting, parsing and manipulating DateTime with human‑readable strings and ready‑made widgets.

WASM-ready
$ flutter pub add smart_date_formatter
Source repository

What it does

Provides extensions and helpers to convert DateTime into relative, calendar and custom formatted strings. Includes parsers for natural language dates and ready‑to‑use Flutter widgets like TimeAgoText and DateBadge.

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

Use it when

  • You need quick, human‑readable date strings (e.g., "2 hours ago
  • Yesterday").
  • You want built‑in widgets that auto‑refresh date displays without extra packages.

Skip it when

  • Precise timezone or locale handling beyond the 16 built‑in languages is required.

Strengths

  • Zero external dependencies – pure Flutter.
  • Comprehensive feature set: relative time, parsing, calculations, widgets, and multi‑language support.
  • Null‑safe and fully documented.

Weaknesses

  • Limited to Flutter; not a pure Dart library for server‑side use.
  • Only 16 locales are supported out of the box.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:smart_date_formatter/smart_date_formatter.dart';

void main(){
  final now = DateTime.now();
  print(now.timeAgo); // e.g., "2 hours ago"
  print(now.calendar); // "Today"
  print(now.format('dd-MM-yyyy'));
}

Alternatives

Packages that do the same job and could replace smart_date_formatter.

  • clock

    Provides simple time utilities and a testable Clock abstraction without UI widgets.