timeago.dart
timeago.dart copied to clipboard
A library useful for creating fuzzy timestamps. (e.g. "5 minutes ago")
This PR should make using the locales easier, by pre-defining them by default statically in that the user won't make a mistake writing the wrong string locale. So, instead of:...
### WHY? Why I understand you can do "timeago.setLocaleMessages('en', CustomEnglishMessages());` to override custom messages for maybe that one specific usecase, the developer has to remember to reset the locale after...
`widget.item.ts` is in UTC time the below code is still calculating from DateTime.now and not from UTC time. What may be the problem? ``` timeago.format( DateTime.parse(widget.item.ts), locale: 'custom', clock: DateTime.now().toUtc(),
Hi friends, I get this strange warning: ``` I/flutter ( 1760): Locale [fr] has not been added, using [en] as fallback. To add a locale use [setLocaleMessages] ``` How can...
This library is working great for me, but I have an idea for a small improvement. In my case I want to use it on timestamps from a server. There's...
**Added Bangla Language Support with Bangla Digits** Changes: - Added the BnMessages class to use Bangla language and digits. - Added the BnShortMessages class to use Bangla short forms and...
I translated from Czech language, should be right: import 'package:timeago/src/messages/lookupmessages.dart'; /// Slovak Messages class SkMessages implements LookupMessages { @override String prefixAgo() => 'pred'; @override String prefixFromNow() => 'o'; @override String...
**Please, add Kazakh language.** Code example: ``` switch (code) { case 'en': timeago.setLocaleMessages('en', timeago.EnMessages()); break; case 'ru': timeago.setLocaleMessages('ru', timeago.RuMessages()); break; case 'kk': // FIXME: does not support Kazahkstan language timeago.setLocaleMessages('kk',...
timeago.format(DateTime date = DateTime( 2024, 9, 27, 23, 59 )) gives a moment ago! Ran on 19th September 2024.