timed 0.0.1+2 copy "timed: ^0.0.1+2" to clipboard
timed: ^0.0.1+2 copied to clipboard

Calculates the time interval between two dates in seconds, minutes, days, weeks, months, or years.

example/timed_example.dart

import 'dart:math';

import 'package:timed/timed.dart';

void main() {
  var example1 = Timed.get(to: DateTime(2022, 05, 01));
  print('example1: $example1');

  var to = DateTime(2022, 05, 01);
  var from = DateTime(2022, 12, 01);

  var example2 = Timed.get(to: to, from: from);
  print('example2: $example2');

  to = DateTime(2022, 05, 01);
  from = DateTime(2022, 05, 01);

  var example3 = Timed.get(to: to, from: from);
  print('example3: $example3');

  print('now: ${DateTime(2019, 03, 25).toTimed}');

  to = DateTime(2018, 03, 24);

  var example4 = Timed.get(to: to,annualLimit: 10);
  print('example4: $example4');
}
1
likes
150
pub points
0%
popularity

Publisher

verified publisheredvaldomartins.dev

Calculates the time interval between two dates in seconds, minutes, days, weeks, months, or years.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on timed