time 1.0.0 copy "time: ^1.0.0" to clipboard
time: ^1.0.0 copied to clipboard

outdated

Type-safe DateTime and Duration calculations, powered by extensions.

example/time_example.dart

import 'package:time/time.dart';

void main() {
  // Integer Extensions
  print(1.weeks);
  print(7.days);
  print(22.hours);
  print(45.minutes);
  print(30.seconds);
  print(15.milliseconds);
  print(10.microseconds);
  print(5.nanoseconds);

  // DateTime Extensions
  print(DateTime.now() + 7.days);
  print(DateTime.now() - 7.days);

  // Duration Extensions
  print(7.days.inWeeks);
  print(7.days.later);
  print(7.days.ago);
}
345
likes
0
pub points
93%
popularity

Publisher

verified publisherogbomo.com

Type-safe DateTime and Duration calculations, powered by extensions.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on time