time_ago_provider 0.0.1
time_ago_provider: ^0.0.1 copied to clipboard
A Library that takes a time stamp value and returns an interval String of the time that passed between the given time stamp to the present (Now). (e.g. "7 minutes ago" ).
A Library that takes a time stamp value and returns an interval String of the time that passed between the given time stamp to the present (Now). (e.g. "7 minutes ago" ).
Usage #
Easy Lazy! Feed her timestamp, produces you time ago.
import 'package:time_ago_provider/time_ago_provider.dart';
void main()
{
//Normal Usage
int myTimeStamp = DateTime.now().millisecondsSinceEpoch; // Get the current time stamp
print(TimeAgo.getTimeAgo(timeStamp: myTimeStamp));
//Output e.g: 7 minutes ago
//With Language [Default Language = ENGLISH]
int mySecondTimeStamp = DateTime.now().millisecondsSinceEpoch;
print(TimeAgo.getTimeAgo(timeStamp: mySecondTimeStamp, language: Language.GERMAN));
//Output e.g: 7 minuten her
}
Supported Languages #
- ✅ ENGLISH
- ✅ ARABIC
- ✅ GERMAN
- ✅ SPANISH
- ✅ CHINESE
- ✅ RUSSIAN
- ✅ PORTUGUESE
- ✅ JAPANESE
- ✅ HINDI
- ✅ FRENCH.
Features and bugs #
Please file feature requests and bugs at the issue tracker.