Skip to content

This is flutter package used to change date to time ago(ex: 2 minutes ago) for english, arabic and kurdish languages, simple and easy to use. available in pub.dev

License

Notifications You must be signed in to change notification settings

zakarya-dev/z_time_ago

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

This is flutter package used to change date to time ago(ex: 2 minutes ago) for english, arabic and kurdish languages, simple and easy to use. available in pub.dev

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages