This package is used to get time duration from now and given time for kurdish, arabic and english, simple and easy to use.
🌟 Changes date to time ago.
Depend on it
add package to your pubspec.yaml file
dependecies:
flutter:
sdk: flutter
z_time_ago: any
Or
Run this command in terminal
flutter pub add z_time_ago
Import it
import 'package:z_time_ago/z_time_ago.dart';
With DateTime Type
String result = ZTimeAgo().getTimeAgo(
date: DateTime.parse('2021-01-15 20:50:36.977'),
language: Language.kurdish,
);
With String Type
String result = ZTimeAgo().getTimeAgo(
date: '2021-01-15 20:50:36.977',
language: Language.kurdish,
);
ZTimeAgo().getTimeAgo(
date: '2022-01-28 11:46:54.897839',
),
ZTimeAgo().getTimeAgo(
date: '2022-01-28 11:46:54.897839',
language: Language.arabic,
),
ZTimeAgo().getTimeAgo(
date: '2022-03-01 08:46:54.897839',
),
ZTimeAgo().getTimeAgo(
date: '2022-03-01 08:46:54.897839',
language: Language.kurdish,
),
ZTimeAgo().getTimeAgo(
date: '2022-03-01 08:46:54.897839',
language: Language.arabic,
),
ZTimeAgo().getTimeAgo(
date: '2022-03-01 08:46:54.897839',
language: Language.english,
),
ZTimeAgo().getTimeAgo(
date: DateTime.now(),
),
ZTimeAgo().getTimeAgo(
date: DateTime.now(),
language: Language.arabic,
),
ZTimeAgo().getTimeAgo(
date: DateTime.now(),
language: Language.english,
),
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