simple_date 1.0.0
simple_date: ^1.0.0 copied to clipboard

A simple date model for Dart.

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!
}