-
Notifications
You must be signed in to change notification settings - Fork 23
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
ForDuration calculation with 0 raises error #59
Comments
craiglittle
added a commit
that referenced
this issue
Apr 11, 2016
Zero or a negative number does not make sense in the context of moving backward or forward through time, so we'll catch those uses before the calculations are even performed. Fixes #59.
craiglittle
added a commit
that referenced
this issue
Apr 11, 2016
Zero or a negative number does not make sense in the context of moving backward or forward through time, so we'll catch those uses before the calculations are even performed. Fixes #59.
Thanks for the report! Descriptive error on the way: #60 |
craiglittle
added a commit
that referenced
this issue
Apr 11, 2016
A negative scalar does not make sense in the context of moving backward or forward through time, so we'll catch those uses before the calculations are even performed. Fixes #59.
craiglittle
added a commit
that referenced
this issue
Apr 11, 2016
Negative scalars are not something we want to explicitly support at this time, so we'll raise a helpful error message instead of randomly blowing up when someone tries to do it. Fixes #59.
craiglittle
added a commit
that referenced
this issue
Apr 12, 2016
The first active period in the chosen direction is found and the time at the beginning of that period returned. If the specified origin is in the middle of an active period, that time is returned. The same logic is applied looking forward or backward with the only difference being the direction. Fixes #59.
craiglittle
added a commit
that referenced
this issue
Apr 12, 2016
The first active period in the chosen direction is found and the time at the beginning of that period returned. If the specified origin is in the middle of an active period, that time is returned. The same logic is applied looking forward or backward with the only difference being the direction. Fixes #59.
craiglittle
added a commit
that referenced
this issue
Apr 12, 2016
The first active period in the chosen direction is found and the time at the beginning of that period returned. If the specified origin is in the middle of an active period, that time is returned. The same logic is applied looking forward or backward with the only difference being the direction. Fixes #59.
craiglittle
added a commit
that referenced
this issue
Apr 12, 2016
The first active period in the chosen direction is found and the time at the beginning of that period returned. If the specified origin is in the middle of an active period, that time is returned. The same logic is applied looking forward or backward with the only difference being the direction. Fixes #59.
craiglittle
added a commit
that referenced
this issue
Apr 12, 2016
The first active period in the chosen direction is found and the time at the beginning of that period returned. If the specified origin is in the middle of an active period, that time is returned. The same logic is applied looking forward or backward with the only difference being the direction. Fixes #59.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just ran into an issue where I tried to calculate 0 days after a given time, and got an error.
It looks like the issue is here:
Where it's taking 0 from the array. Is this a case you would like to handle? If not, it might be good to add a descriptive error, because it took a little while to hunt down the problem.
The text was updated successfully, but these errors were encountered: