0 purchases
z time ago
This package is used to get time duration from now and given time for kurdish, arabic and english, simple and easy to use.
Features #
🌟 Changes date to time ago.
Getting started #
Depend on it
add package to your pubspec.yaml file
dependecies:
flutter:
sdk: flutter
z_time_ago: any
copied to clipboard
Or
Run this command in terminal
flutter pub add z_time_ago
copied to clipboard
Import it
import 'package:z_time_ago/z_time_ago.dart';
copied to clipboard
Usage #
With DateTime Type
String result = ZTimeAgo().getTimeAgo(
date: DateTime.parse('2021-01-15 20:50:36.977'),
language: Language.kurdish,
);
copied to clipboard
With String Type
String result = ZTimeAgo().getTimeAgo(
date: '2021-01-15 20:50:36.977',
language: Language.kurdish,
);
copied to clipboard
More Examples #
ZTimeAgo().getTimeAgo(
date: '2022-01-28 11:46:54.897839',
),
copied to clipboard
ZTimeAgo().getTimeAgo(
date: '2022-01-28 11:46:54.897839',
language: Language.arabic,
),
copied to clipboard
ZTimeAgo().getTimeAgo(
date: '2022-03-01 08:46:54.897839',
),
copied to clipboard
ZTimeAgo().getTimeAgo(
date: '2022-03-01 08:46:54.897839',
language: Language.kurdish,
),
copied to clipboard
ZTimeAgo().getTimeAgo(
date: '2022-03-01 08:46:54.897839',
language: Language.arabic,
),
copied to clipboard
ZTimeAgo().getTimeAgo(
date: '2022-03-01 08:46:54.897839',
language: Language.english,
),
copied to clipboard
ZTimeAgo().getTimeAgo(
date: DateTime.now(),
),
copied to clipboard
ZTimeAgo().getTimeAgo(
date: DateTime.now(),
language: Language.arabic,
),
copied to clipboard
ZTimeAgo().getTimeAgo(
date: DateTime.now(),
language: Language.english,
),
copied to clipboard
Bugs And Issues #
In case of having any issues, feel free to open an issue, & if you think that the library needs a feature let me know by adding it in this link
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.