पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv1.0.0

age_calculator

किसी के उम्र को दिनों, महीनों और वर्षों में गणना करने के लिए एक Flutter पैकेज; साथ ही दो तिथियों के बीच अंतर ज्ञात करने के लिए भी उपयोग किया जा सकता है।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
13.2 हज़ार
लाइक
66
Pub अंक
160

पैकेज इंस्टॉल करें

flutter pub add age_calculator

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

age_calculator पैकेज एक फ्लटर उपयोगिता है जिसका उपयोग किसी व्यक्ति की आयु वर्ष, महीने और दिनों में गणना करने के लिए किया जाता है। इसमें दो तारीखों के बीच अंतर की सटीक गणना करने की क्षमता भी है। आयु प्रमाणीकरण या तारीख तुलना की आवश्यकता वाले ऐप्स के लिए आदर्श, जैसे कि स्वास्थ्य ऐप्स, पंजीकरण फॉर्म या घटना योजनाकर्ता। पैकेज सभी प्रमुख प्लेटफॉर्म के लिए समर्थन करता है, जिसमें Android, iOS, Web, macOS, Windows और Linux शामिल हैं, जिससे क्रॉस-प्लेटफॉर्म सुसंगतता सुनिश्चित होती है। यह डेवलपर्स को अपने ऐप्स में आयु गणना को बिना किसी दिक्कत के एकीकृत करने के लिए एक सरल, स्पष्ट API प्रदान करता है।

उपयोग

  • उपयोगकर्ता पंजीकरण में उम्र प्रमाणीकरण
  • स्वास्थ्य ऐप में रोगी की उम्र की गणना करना
  • आयु के आधार पर इवेंट क्वालीफिकेशन निर्धारित करना
  • योजना उद्देश्यों के लिए तारीखों की तुलना
  • तारीखों के अंतर का उपयोग करके माइलस्टोन का ट्रैकिंग करें

मुख्य विशेषताएँ

  • वर्ष, महीने और दिनों में उम्र की गणना करता है
  • सटीक तारीख अंतर की गणना करता है
  • क्रॉस-प्लेटफॉर्म संगतता
  • सरल और स्पष्ट एपीआई
  • नल-सुरक्षित तारीख इनपुट समर्थित

इनके लिए उपयुक्त

  • उम्र जाँच की आवश्यकता वाला फॉर्म सत्यापन
  • स्वास्थ्य और स्वास्थ्य अनुप्रयोग
  • जन्मदिन और वर्षगांठ ट्रैकर
  • समय-आधारित सीखने वाले शैक्षिक ऐप्स
  • सटीक तारीख गणना की आवश्यकता वाले अनुप्रयोग

विचार योग्य बातें

  • मान्य DateTime इनपुट की आवश्यकता होती है
  • लीप वर्ष जैसे किनारे के मामलों का निपटारा करने की आवश्यकता हो सकती है
  • बहुत बड़े तारीख सीमा के लिए अनअनुकूलित
  • केवल तिथि-आधारित गणना तक सीमित
  • समय क्षेत्र-संवेदनशील विशेषताओं को शामिल नहीं करता है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

age_calculator

A Flutter package that allows you to perform operations between dates:

  • Calculate a person's age and the time remaining to their next birthday in years, months and days.
  • Calculate differences between two dates in years, months and days.
  • Add years, months and days to any date.

Getting Started

In your flutter project add the dependency:

dependencies: ... age_calculator: ^1.0.0

For help getting started with Flutter, view the online documentation.

Example
import 'package:age_calculator/age_calculator.dart';

void main() {
  DateTime birthday = DateTime(1997, 3, 5);

  DateDuration duration;

  // Find out your age as of today's date 2021-03-08
  duration = AgeCalculator.age(birthday);
  print('Your age is $duration'); // Your age is Years: 24, Months: 0, Days: 3

  //Find out your age on any given date
  duration = AgeCalculator.age(birthday, today: DateTime(2030, 5, 1));
  print('Your age is $duration'); // Your age is Years: 33, Months: 1, Days: 26

  // Find out when your next birthday will be at 2021-03-08
  duration = AgeCalculator.timeToNextBirthday(birthday);
  print('You next birthday will be in $duration');
  // You next birthday will be in Years: 0, Months: 11, Days: 25

  // Find out when your next birthday will be on any given date
  duration = AgeCalculator.timeToNextBirthday(birthday,
      fromDate: DateTime(2021, 3, 2));
  print('You next birthday will be in $duration');
  // You next birthday will be in Years: 0, Months: 0, Days: 3

  // Find out the difference between two dates
  duration = AgeCalculator.dateDifference(
    fromDate: DateTime(2021, 1, 2),
    toDate: DateTime(2025, 5, 2),
  );
  print('The difference is $duration');
  // You next birthday will be in Years: 4, Months: 4, Days: 0

  // Add time to any date
  DateTime date = AgeCalculator.add(
      date: DateTime(2021, 1, 2),
      duration: DateDuration(years: 5, months: 2, days: 1));
  print(date);
  // 2026-03-03 00:00:00.000
}

श्रेणियाँ

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट