Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly better ergonomics for custom format override #215

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yiminghan
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant