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

[Duration] Duration humanize requires RelativeTime plugin but not mentioned. #988

Closed
SevenOutman opened this issue Aug 6, 2020 · 2 comments

Comments

@SevenOutman
Copy link

I'm using Duration plugin for formatting a duration as the documentation guides, but got the following error:

Uncaught TypeError:  t(...).add(...).locale(...).fromNow is not a function

I realized that .humanize() from Duration plugin relies on .fromNow() method provided by RelativeTime plugin, which is not mentioned in documentation. I think either this should be stated in the docs, or Duration should just load RelativeTime automatically.

@iamkun
Copy link
Owner

iamkun commented Aug 6, 2020

We have mentioned it https://day.js.org/docs/en/durations/humanize.

But should add it to this as well, thanks.

@iamkun
Copy link
Owner

iamkun commented Aug 6, 2020

https://day.js.org/docs/en/durations/locale updated

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

No branches or pull requests

2 participants