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

Wrong annotation for Time.compareDateOnlyTz() #799

Open
dilyanpalauzov opened this issue Nov 28, 2024 · 0 comments
Open

Wrong annotation for Time.compareDateOnlyTz() #799

dilyanpalauzov opened this issue Nov 28, 2024 · 0 comments

Comments

@dilyanpalauzov
Copy link
Contributor

Time.prototype.compareDateOnlyTz() has this comment

  /** 
   * Compares only the date part of this instance with another one. 
   *
   * @param {Duration} other              The instance to compare with 
   * @param {Timezone} tz                 The timezone to compare in
   * @return {Number}                     -1, 0 or 1 for less/equal/greater 
   */
 compareDateOnlyTz(other, tz)

so other is supposed to be of type Duration. But test/time_test.js calls several times compareDateOnlyTz, passing as first parameter the result of Time.fromString(), thus a Time object.

  • Adjust the type of the other parameter above to Time
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

1 participant