datetime_difference 1.0.4
datetime_difference: ^1.0.4 copied to clipboard
Calculates the difference between two dates. It returns a string with the difference in years, months, days, hours, minutes and seconds.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add datetime_differenceThis will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
datetime_difference: ^1.0.4Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:datetime_difference/flutter_date_difference.dart';
import 'package:datetime_difference/flutter_date_difference_helper.dart';
import 'package:datetime_difference/locale_providers/mobile_locale.dart';
import 'package:datetime_difference/locale_providers/web_locale.dart';