z_time_ago 0.1.2 copy "z_time_ago: ^0.1.2" to clipboard
z_time_ago: ^0.1.2 copied to clipboard

A flutter package to get duration between current date and a given date for kurdish, arabic and english languages.

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

Or

Run this command in terminal

flutter pub add z_time_ago

Import it

import 'package:z_time_ago/z_time_ago.dart';




Usage #

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,
);





More Examples #

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,
),



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

13
likes
140
points
11
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter package to get duration between current date and a given date for kurdish, arabic and english languages.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on z_time_ago