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

Creating a TimeSeries of IndexedEvent with indexes before epoch throws TypeError #236

Open
imaspeer opened this issue Apr 19, 2021 · 0 comments

Comments

@imaspeer
Copy link

The following code

const pond = require('pondjs');

const index = pond.Index.getIndexString('1d', new Date('1969-12-31')); // 1d--1
new pond.TimeSeries({columns: ['index', 'value'], points: [[index, 1]]});

which should be correct according to the documentation of TimeSeries, throws TypeError: Cannot read property 'begin' of undefined.

The error happens for any date before 1970-01-01, and it works correctly for any date after.
Using an index string of the form 1969-12-01 also results in the same error.

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