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

feat: add strict option for defaultConverter #231

Merged
merged 7 commits into from
Apr 30, 2022

Conversation

srabouin
Copy link
Contributor

formatDistanceToNow: less than a minute ago
formatDistanceToNowStrict: 0 seconds ago

formatDistanceToNow: less than a minute ago
formatDistanceToNowStrict: 0 seconds ago
@MrDeerly
Copy link
Owner

Hey @srabouin!

Thanks alot for your PR! :)

You should already be able to use formatDistanceToNowStrict by passing it as a custom converter: https://mrdeerly.github.io/vue-timeago3/guide/configuration.html#converter-1

But in all honesty, i have no issue with merging your PR as it is a good addition to the default converter. In order to get it merged, it would be cool if you could adjust the related docs for the converterOptions:

If you want to, you can also add a simple test case for the new converterOption:
https://github.com/MrDeerly/vue-timeago3/blob/master/tests/unit/defaultConverter.spec.ts (if not, i'll do it)

Thanks!

@MrDeerly MrDeerly self-assigned this Apr 28, 2022
@MrDeerly MrDeerly self-requested a review April 28, 2022 13:54
@MrDeerly MrDeerly added the enhancement New feature or request label Apr 28, 2022
@srabouin
Copy link
Contributor Author

I added the docs and the example, noticed the example was using the wrong version so I also updated that. Hope this helps!

@MrDeerly MrDeerly changed the title Add strict units feat: added strict option for defaultConverter Apr 30, 2022
@MrDeerly MrDeerly changed the title feat: added strict option for defaultConverter feat: add strict option for defaultConverter Apr 30, 2022
@MrDeerly MrDeerly merged commit 6d8097a into MrDeerly:master Apr 30, 2022
@MrDeerly
Copy link
Owner

Hey @srabouin!

Your change was just released in v2.2.0. Thanks again for your contribution! :)

@srabouin
Copy link
Contributor Author

Awesome, thanks for fixing the little things :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants