main function

void main()

Implementation

void main() {
  // Create a new DateTime object
  DateTime dateOfBirth = DateTime(1990, 12, 31);
  DateTime currentDate = DateTime.now();

  // Calculate the age
  DateDuration age = AgeCalculator.dateDifference(
    fromDate: dateOfBirth,
    toDate: currentDate,
  );

  // Print the age
  print(age);
}