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

This package for formatting DateTime to beatiful string variant.

📅 DateTimeFormatExtension #

DateTimeFormatExtension is a lightweight Dart extension that allows formatting DateTime objects into human-readable strings with customizable separators.


✨ Features #

  • Format DateTime into:
    • dd/MM/yyyy using withSlash
    • dd.MM.yyyy using withDot
    • dd:MM:yyyy (default) or withDoubleDot
  • Clean and simple API
  • No third-party dependencies

🛠 Installation #

Add the file date_time_format_extension.dart to your project or include this extension in your custom utility package.


🚀 Usage #

import 'your_package_name/date_time_format_extension.dart';

void main() {
  final now = DateTime(2025, 4, 25);

  print(now.formatToString()); 
  // Output: 25:04:2025

  print(now.formatToString(type: DateTimeFormatterType.withSlash)); 
  // Output: 25/04/2025

  print(now.formatToString(type: DateTimeFormatterType.withDot)); 
  // Output: 25.04.2025
}
2
likes
150
points
135
downloads

Publisher

unverified uploader

Weekly Downloads

This package for formatting DateTime to beatiful string variant.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on format_date_time_package