timeago.dart icon indicating copy to clipboard operation
timeago.dart copied to clipboard

Slightly better ergonomics for custom format override

Open yiminghan opened this issue 2 years ago • 0 comments

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 and it's error prune.

This PR proposes a slightly better way to use custom message formats - just pass them into .format()

This should unlock slightly easier ways for those specific use cases that may not apply to the entire application

yiminghan avatar May 28 '23 21:05 yiminghan