date_formatted_2024 0.0.4 copy "date_formatted_2024: ^0.0.4" to clipboard
date_formatted_2024: ^0.0.4 copied to clipboard

A Dart package providing various extensions on DateTime for easy and flexible date formatting.

example/example.dart

import 'package:date_formatted_2024/date_formatted_2024.dart';

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

  // Using the DateFormateExtension to format the date
  print(now.formatToDDMonthYYYY()); // prints: DD/Month/YYYY
  print(now.formatToYYYYMonthDD()); // prints: YYYY/Month/DD
  print(now.formatToDDMonthYYYYWithDash()); // prints: DD-Month-YYYY
  print(now.formatToYYYYMonthDDWithDash()); // prints: YYYY-Month-DD
  print(now.formatToDDMMYYYY()); // prints: DD/MM/YYYY
  print(now.formatToYYYYMMDD()); // prints: YYYY/MM/DD
  print(now.formatToDDMMYYYYWithDash()); // prints: DD-MM-YYYY
  print(now.formatToYYYYMMDDWithDash()); // prints: YYYY-MM-DD
  print(now.formatToDDMMYYYYHHMM()); // prints: DD/MM/YYYY HH:MM
  print(now.formatToYYYYMMDDHHMM()); // prints: YYYY/MM/DD HH:MM
  print(now.formatToDDMMYYYYWithDashHHMM()); // prints: DD-MM-YYYY HH:MM
  print(now.formatToYYYYMMDDWithDashHHMM()); // prints: YYYY-MM-DD HH:MM
  print(now.formatToDDMMYYYYHHMMSS()); // prints: DD/MM/YYYY HH:MM:SS
  print(now.formatToYYYYMMDDHHMMSS()); // prints: YYYY/MM/DD HH:MM:SS
}
4
likes
160
points
37
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package providing various extensions on DateTime for easy and flexible date formatting.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on date_formatted_2024