format_date

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

format date

A simple package that helps in formatting date and time from a given DateTime object.
Features #
Convert Datetime to String with desired format effortlessly.
Getting started #
flutter pub add format_date

copied to clipboard
Usage #
import 'package:format_date/format_date.dart';

void main(){
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
DateTime currentDateTime = DateTime.now();

@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
Text(
FormatDate.formatDate(dateTime: currentDateTime,), //dd-mm-yyyy
);
Text(
FormatDate.formatDate(dateTime: currentDateTime, format: 'dd/mm'),
);
Text(
FormatDate.formatTime(dateTime: currentDateTime,), //hh:mm:ss
);
Text(
FormatDate.formatTime(dateTime: currentDateTime, format: 'hh:mm'),
);
]
),
);
}
}




copied to clipboard
Additional information #
For more information:
https://github.com/gru786/format_date

License

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

Files:

Customer Reviews

There are no reviews.