iexcloud icon indicating copy to clipboard operation
iexcloud copied to clipboard

Aligned the "Minute" members of intraday and historical data points.

Open karagog opened this issue 2 years ago • 4 comments

They appear to both be used the same way, as a string field that tells us the minute of the data point in the time zone of the exchange.

I also removed a helper function that attempts to get the time from the historical data point by combining the date and minute fields. The problem is that this results in the wrong time because the time objects are in UTC, so to do this right you'd need to know the time zone which the "minute" value is in. I think we should leave it up to the consumer to write their methods to convert times according to their special circumstances.

karagog avatar Dec 12 '21 00:12 karagog

TL;DR is that I changed HistoricalDataPoint.Minute from a string to an HourMinute object, the same way as IntradayPrice.

karagog avatar Dec 12 '21 00:12 karagog

FYI this merges cleanly again after the updates to main.

karagog avatar Feb 17 '22 07:02 karagog

Do you think this is a breaking change that should be delayed until a major version bump to maintain semantic versioning?

matthewrankin avatar Mar 03 '22 13:03 matthewrankin

Yes this is potentially a breaking change, if someone is depending on the Time() method of historical data point (although I'm not sure how someone even uses that correctly, due to the lack of time zone). Otherwise I think parsing the json response is backwards compatible.

karagog avatar Mar 22 '22 06:03 karagog