time_elapsed 0.2.3 copy "time_elapsed: ^0.2.3" to clipboard
time_elapsed: ^0.2.3 copied to clipboard

outdated

A package provides a easy way to get elapsed time from DateTime data

Intl #

This package provides a way to facility how you getting elapsed time from a DateTime data. More applied to check how long from now an event happened.

Default: #

It return elapsed time by Weeks, Days, Hours and Minutes

How to use: #

The package has a two method to get date time elapsed: fromDateStr() and fromDateTime()

You can pass it as String or DateTime type:

  String timeString = "2020-04-19 03:48:57.063773"; // set a String type var with Date sample
  DateTime timeDate = DateTime.parse("2020-04-19 03:48:57.063773"); // set a DateTime var sample

  // to calculate from String
  String timeStamp = TimeElapsed().fromDateStr(timeString); // returns 8w (cos now days:2020-06-19)
  
  // to calculate from DateTime
  String timeStamp = TimeElapsed().fromDateTime(timeDate); // return 8w (cos now days: 2020-06-19)

both methods will return the time elapsed as String #

How install: #

  // on your dart file
  import 'package:time_elapsed/time_elapsed.dart';
  
  // on pubspec.yaml
  dependencies:
    time_elapsed:   

Example: #

Example app it run Time elapsed by clicking FAB.

pay attemtion on indent pubspec

17
likes
0
pub points
84%
popularity

Publisher

verified publisherallansrc.com.br

A package provides a easy way to get elapsed time from DateTime data

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on time_elapsed