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

A simple and flexible DateTime formatter for Dart & Flutter. Format dates and times with custom order, padding, 12H/24H system, and more.

example/main.dart

import 'package:chronos_formatter/chronos_formatter.dart';

void main() {
  final now = DateTime(2025, 9, 4, 15, 7, 9);

  print(
    ChronosFormatter.format(
      now,
      order: DateOrder.mdy,
      withHours: true,
      is12HSystem: true,
    ),
  );
  // Output: 09/04/2025 03:07 PM

  print(
    ChronosFormatter.format(
      now,
      order: DateOrder.ymd,
      showDate: true,
      withHours: false,
    ),
  );
  // Output: 2025/09/04

  print(ChronosFormatter.format(now, showDate: false, withHours: true));
  // Output: 15:07
}
1
likes
160
points
12
downloads

Publisher

verified publisherteutondev.com

Weekly Downloads

A simple and flexible DateTime formatter for Dart & Flutter. Format dates and times with custom order, padding, 12H/24H system, and more.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on chronos_formatter