Skip to content

Conversation

@KlausNie
Copy link

@KlausNie KlausNie commented May 15, 2024

  • include note relevant methods
  • include reference to documentation

Ref: #1626

* include reference to different behaviour for Durations created out of factory methods
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 15, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

Copy link
Collaborator

@diesieben07 diesieben07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately the documentation you have added is factually not correct.
I also don't think we should be copy pasting the same text at all the accessors.

Comment on lines +868 to +869
* Note: Durations created out of Duration.from* (e.g. fromObject) factories will always yield 0.
* This will give you the correct difference in years, if the Duration was created out of a diff operation.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is factually incorrect. Duration.fromObject({ years: 2 }).years is 2, not 0.
I am not sure what you're referring to by "correct difference in years" here.

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.

2 participants