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

fix(delay): Now properly handles Date and negative numbers #5719

Merged

Conversation

benlesh
Copy link
Member

@benlesh benlesh commented Sep 11, 2020

  • Resolves an issue where passing a Date would cause every value to be scheduled incorrectly, instead of delaying all values until the absolute date -- as documented.
  • Resolves an issue where negative numbers were treated as though they were positive numbers
  • Reduces operator sizes
  • Adds comments and formatting
  • Updates tests to reflect better behavior
  • Adds test for Dates in the past.
  • delay now based on delayWhen and timer.

@benlesh benlesh force-pushed the fix/delay-Date-and-negative-numbers branch from 7f2b1e4 to 3400a82 Compare September 11, 2020 04:47
@benlesh benlesh force-pushed the fix/delay-Date-and-negative-numbers branch from 3400a82 to 31436fc Compare September 29, 2020 00:10
@benlesh
Copy link
Member Author

benlesh commented Sep 29, 2020

timer looks like it needs a little work, but I'll put that in another PR.

Copy link
Collaborator

@cartant cartant left a comment

Choose a reason for hiding this comment

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

LGTM, just a really minor nitpick.

spec/operators/delay-spec.ts Outdated Show resolved Hide resolved
- Resolves an issue where passing a Date would cause every value to be scheduled incorrectly, instead of delaying all values until the absolute date -- as documented.
- Resolves an issue where negative numbers were treated as though they were positive numbers
- Reduces operator sizes
- Adds comments and formatting
- Updates tests to reflect better behavior
- Adds test for Dates in the past.

fixes ReactiveX#5232
@benlesh benlesh force-pushed the fix/delay-Date-and-negative-numbers branch from 31436fc to 37dc32c Compare September 29, 2020 02:39
@benlesh benlesh merged commit 868c02b into ReactiveX:master Sep 29, 2020
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