Skip to main content
Version: 2.0.2

Short forms

You can use Abbreviation for both relative and precise durations.

final yesterday = - const Duration(days: 1);
yesterday.fromNow(form: Abbreviation.full); // 1d ago

final add37min = + const Duration(minutes: 37);
add37min.fromNow(form: Abbreviation.semi); // 37 min ago

final add46min = + const Duration(minutes: 46);
add46min.fromNow(form: Abbreviation.full); // in 1h

The implementation of this feature for languages may be suboptimal.

If you think mid/short words for your langauge could use some improvement, please make a pull request. See contribution guidelines