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

GitHub रिपॉज़िटरीbaderouaich/time_ago_provider

time_ago_provider

उदाहरण के लिए फजी समयांतर के लिए लाइब्रेरी ("9 मिनट पहले")

time_ago_provider प्रोजेक्ट कवर
स्टार
17
फ़ोर्क
12
अंतिम पुश (UTC)
6 अक्टू॰ 2023
प्रोजेक्ट स्थिति
सक्रिय

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

time_ago_provider

library for generating fuzzy timestamp e.g("9 minutes ago")

pub package Github test

import 'package:time_ago_provider/time_ago_provider.dart' as timeAgo;

void main() {
  /// Default Format (summary of elapsed time)
  final nineMinutesElapsed = DateTime.now().subtract(Duration(minutes: 9));
  print(timeAgo.format(nineMinutesElapsed)); // 9 minutes ago
  print(timeAgo.format(nineMinutesElapsed, locale: 'en_short')); // 9 min

  /// Full Format (detailed elapsed time years, months, days...)
  final longTimeElapsed = DateTime.now().subtract(Duration(days: 999, hours: 6, minutes: 8, seconds: 3));
  print(timeAgo.formatFull(longTimeElapsed)); // 2 years, 9 months, 9 days, 6 hours, 8 minutes, 3 seconds
  print(timeAgo.formatFull(longTimeElapsed, locale: 'en_short')); // 2 yr, 9 mo, 9 d, 6 h, 8 min, 3 sec

  /// Adding new locales
  timeAgo.setLocale('de', timeAgo.German());
  timeAgo.setLocale('de_short', timeAgo.German(shortForm: true));
  print(time_ago.format(nineMinutesElapsed, locale: 'de')); // vor 9 Minuten
  print(timeAgo.format(nineMinutesElapsed, locale: 'de_short')); // 9 Min.
}

Supported Languages

  • [x] ENGLISH
  • [x] GERMAN
  • [x] POLISH
  • [x] FRENCH
  • [x] ARABIC
  • [x] TURKISH
  • [x] PORTUGUESE
  • [x] ITALIAN
  • [x] SWEDISH
  • [x] NORWEGIAN
  • [x] PERSIAN
  • [x] SPANISH
  • More will be added

Installing

Package

Contributors ✨

Thanks goes to these wonderful people!

Features and bugs

If you face any problems feel free to open an issue at the issue tracker. If you feel the library is missing a feature, please raise a ticket on Github. Pull request are also welcome.

Bader GitHub avatar
GitHub लेखक

Bader ↗

भाषाएँDart

श्रेणियाँ

उपयोग की गई निर्भरताएँ

निर्भरता सूची 3 आइटम

  • flutter_coverage_badgeडेवलपमेंट^0.0.1+1
  • flutter_lintsडेवलपमेंट^2.0.1
  • testडेवलपमेंट^1.16.5

अपने प्रोजेक्ट के लिए रिपॉज़िटरी कैसे चुनें?

उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।

  1. नाम, लेखक या विवरण से खोजें और तकनीकी विषय से परिणाम सीमित करें।
  2. स्टार, फ़ोर्क और हाल के पुश की तुलना करें। स्टार रुचि दर्शाते हैं, गुणवत्ता की गारंटी नहीं।
  3. उपयोग से पहले GitHub पर README, लाइसेंस और Issues जाँचें।

स्रोत और रखरखाव

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗