date_formatter

Creator: coderz1093

Last updated:

Add to Cart

Description:

date formatter

Package for helping to format date from both String and DateTime.
Format DateTime #
import package:date_formatter/date_formatter.dart;

String formattedDate = DateFormatter.formatDateTime(
dateTime: DateTime.now(),
outputFormat: 'dd/MM/yyyy',
);
copied to clipboard
Format String Date #
String formattedDate = DateFormatter.formatStringDate(
date: '25-01-2023 12:45:00',
inputFormat: 'dd-MM-yyyy HH:mm:ss',
outputFormat: 'dd MMM, yyyy',
);
copied to clipboard
Convert String to DateTime #
DateTime? dateTime = DateFormatter.toDateTime(
date: '25-01-2023 12:45:00',
inputFormat: 'dd-MM-yyyy HH:mm:ss',
);
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.