We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug The Duration creator returns incomplete duration if passed the object parameter that's partial:
Solution Adding this.parseFromMilliseconds() in the constructor for the code branch handling the object parameter solves it:
this.parseFromMilliseconds()
if (typeof input === 'object') { Object.keys(input).forEach((k) => { this.$d[prettyUnit(k)] = input[k] }) this.calMilliseconds() + this.parseFromMilliseconds() return this }
Information
The text was updated successfully, but these errors were encountered:
Thanks for the great suggestion! Would you be open to submitting a pull request for this?
Sorry, something went wrong.
fix: fix duration when creating with partial object parameter (iamkun…
519ae3d
…#2633) The Duration creator returned incomplete duration if passed the object parameter that's partial.
ca4bd99
Successfully merging a pull request may close this issue.
Describe the bug
The Duration creator returns incomplete duration if passed the object parameter that's partial:
Solution
Adding
this.parseFromMilliseconds()
in the constructor for the code branch handling the object parameter solves it:if (typeof input === 'object') { Object.keys(input).forEach((k) => { this.$d[prettyUnit(k)] = input[k] }) this.calMilliseconds() + this.parseFromMilliseconds() return this }
Information
The text was updated successfully, but these errors were encountered: