smart_datetime_formatter 0.0.1 copy "smart_datetime_formatter: ^0.0.1" to clipboard
smart_datetime_formatter: ^0.0.1 copied to clipboard

A powerful DateTime formatter with enum patterns, localization, and relative time support.

example/main.dart

import 'package:smart_datetime_formatter/smart_datetime_formatter.dart';

void main() {
  final now = DateTime.now();

  final formatted = SmartDateTimeFormatter.format(
    now,
    pattern: DatePattern.ddMMMyyyyEEEE,
    locale: DateLocale.bangla,
  );

  final relative = RelativeTimeFormatter.timeAgo(
    now.subtract(Duration(hours: 3)),
    locale: DateLocale.english,
  );

  final range = RangeFormatter.formatRange(
    DateTime(2025, 3, 12),
    DateTime(2025, 3, 14),
    locale: DateLocale.english,
  );

  print('Formatted: $formatted');
  print('Relative: $relative');
  print('Range: $range');
}
1
likes
110
points
12
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A powerful DateTime formatter with enum patterns, localization, and relative time support.

License

MIT (license)

Dependencies

intl

More

Packages that depend on smart_datetime_formatter