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

outdated

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

example/time_example.dart

import 'package:time/time.dart';

void main() {
  // Num Extensions
  print(1.weeks);
  print(1.5.weeks);
  print(7.days);
  print(7.5.days);
  print(22.hours);
  print(22.5.hours);
  print(45.minutes);
  print(45.5.minutes);
  print(30.seconds);
  print(30.5.seconds);
  print(15.milliseconds);
  print(15.5.milliseconds);
  print(10.microseconds);
  print(10.5.microseconds);
  print(5.nanoseconds);
  print(5.5.nanoseconds);

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

  // Duration Extensions
  print(7.days.inWeeks);
  print(7.days.fromNow);
  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