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

A simple date model for Dart with no notion of time. Useful for applications that rely on date-only events such as birthdays, anniversaries, and date ranges.

example/simple_date_example.dart

// ignore_for_file: avoid_print
import 'package:simple_date/simple_date.dart';

void main() {
  final today = SimpleDate.today();
  final moonLanding = SimpleDate(1969, 07, 20);

  print(today.isAfter(moonLanding)); // true

  final birthday = SimpleDate(1998, 07, 20);
  final age = birthday.difference(today);
  print(age); // My current age!
}
10
likes
140
pub points
56%
popularity

Publisher

verified publisherjfk.dev

A simple date model for Dart with no notion of time. Useful for applications that rely on date-only events such as birthdays, anniversaries, and date ranges.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

meta

More

Packages that depend on simple_date