age_calculator_helper 1.0.1
age_calculator_helper: ^1.0.1 copied to clipboard
A Dart package to calculate age, zodiac, milestones, and more.
π Hereβs a polished README for age_calculator_helper, ready for pub.dev with badges and links:
age_calculator_helper #
A Dart package to calculate age, time to next birthday, Indian zodiac sign, milestones, and date differences.
This package helps you easily compute age-related details and perform date calculations in Dart apps.
β¨ Features #
β Calculate precise age in years, months, and days β Find time remaining until the next birthday β Get Indian zodiac sign based on date of birth β Compute difference between two dates β Add a duration (years, months, days) to a date β Suggest age-related milestones
π Getting started #
Add to your pubspec.yaml:
dependencies:
age_calculator_helper: ^1.0.0
Import the package:
import 'package:age_calculator_helper/age_calculator_helper.dart';
π Usage #
void main() {
final helper = AgeCalculatorHelper(DateTime(1997, 3, 5));
print('Age: ${helper.getAge()}');
print('Next birthday: ${helper.timeToNextBirthday()}');
print('Indian Zodiac: ${helper.getIndianZodiac()}');
print('Milestones: ${helper.getMilestones()}');
final diff = helper.dateDifference(
fromDate: DateTime(2021, 1, 1),
toDate: DateTime(2025, 5, 1),
);
print('Date difference: $diff');
final futureDate = helper.addToDate(
date: DateTime(2021, 1, 1),
duration: DateDuration(years: 5, months: 2, days: 10),
);
print('Future date: $futureDate');
}
β‘ More examples in the /example folder.
π Additional information #
π Repository: https://github.com/SaranGreenz/age_calculator_helper π Issue tracker: https://github.com/SaranGreenz/age_calculator_helper/issues
π‘ Contributions, feature requests, and bug reports are welcome!