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

Fixes period.within() to be exclusive of end time #124

Merged
merged 1 commit into from Sep 13, 2018
Merged

Conversation

pjm17971
Copy link
Contributor

@pjm17971 pjm17971 commented Sep 13, 2018

Fixes period.within() to be exclusive of end time. Usually timeranges are defined as >= begin time to <end time, otherwise a to b and b to c includes b twice. But period.within() didn't follow that. This change is in period.ts

  • Fixes repeated items in the timeseries alignment when points already fall on boundaries (regression from non-typescript version)
  • Also removes a bunch of unused imports
  • Also adds return types to the timeseries list merge etc (timeseries.ts) because otherwise the return type is just a TimeSeries which is annoying to use

This is because that can cause repeats
Fixes repeated items in the timeseries alignment when points already fall on boundaries (regression from non-typescript version)
Also removes a bunch of unused imports
@@ -110,7 +108,8 @@ export class Period {

/**
* Returns an `Immutable.List` of `Time`s within the given `TimeRange`
* that align with this `Period`.
* that align with this `Period`. Not this will potentially include
Copy link
Contributor

Choose a reason for hiding this comment

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

"Now" instead of "Not" ?
Idk if a spelling change is a big thing

@sartaj10
Copy link
Contributor

Looks good.
Fixing the spelling thing or not is upto you 👍

@pjm17971 pjm17971 merged commit 2a9e80d into master Sep 13, 2018
@pjm17971 pjm17971 deleted the align-fix branch September 13, 2018 23:39
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.

None yet

2 participants