분류, 패키지 및 저장소 검색

GitHub 저장소baderouaich/time_ago_provider

time_ago_provider

예를 들어 "9분 전"과 같은 흐린 타임스탬프를 생성하기 위한 라이브러리

time_ago_provider 프로젝트 이미지
스타
17
포크
12
최근 푸시(UTC)
2023. 10. 6.
프로젝트 상태
활성

원본 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 ↗