Skip to content

Commit 443cd41

Browse files
committed
Release. Bump version number
1 parent c83404a commit 443cd41

File tree

5 files changed

+33
-9
lines changed

5 files changed

+33
-9
lines changed

docs/_coverpage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Barchart Market Data SDK <small>JavaScript 5.7.1</small>
1+
# Barchart Market Data SDK <small>JavaScript 5.7.2</small>
22

33
> Inject real-time market data into your JavaScript applications
44

example/browser/example.js

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5048,7 +5048,7 @@ module.exports = (() => {
50485048
'use strict';
50495049

50505050
return {
5051-
version: '5.7.1'
5051+
version: '5.7.2'
50525052
};
50535053
})();
50545054

@@ -7180,7 +7180,9 @@ module.exports = (() => {
71807180
const putCallCharacter = getPutCallCharacter(definition.option_type);
71817181

71827182
if (definition.root.length < 3) {
7183-
const putCallCharacterCode = putCallCharacter.charCodeAt(0);
7183+
const putCallCharacterCode = putCallCharacter.charCodeAt(0); // 2021/01/02, BRI. Per Tom, symbols (for the same instrument) change each year.
7184+
// The letter D, E, F are calls (+1, +2, +3 years, respectively).
7185+
71847186
converted = `${definition.root}${definition.month}${definition.strike}${String.fromCharCode(putCallCharacterCode + definition.year - getCurrentYear())}`;
71857187
} else {
71867188
converted = `${definition.root}${definition.month}${getYearDigits(definition.year, 1)}|${definition.strike}${putCallCharacter}`;
@@ -8137,6 +8139,26 @@ module.exports = (() => {
81378139
constructor(code) {
81388140
super(code, code);
81398141
}
8142+
/**
8143+
* Attempts to determine if daylight savings time is in effect.
8144+
*
8145+
* @public
8146+
* @param {Number=} timestamp - The moment at which the daylight savings time is checked, otherwise now.
8147+
* @returns {Number}
8148+
*/
8149+
8150+
8151+
getIsDaylightSavingsTime(timestamp) {
8152+
let m;
8153+
8154+
if (is.number(timestamp)) {
8155+
m = moment(timestamp);
8156+
} else {
8157+
m = moment();
8158+
}
8159+
8160+
return m.tz(this.code).isDST();
8161+
}
81408162
/**
81418163
* Calculates and returns the timezone's offset from UTC.
81428164
*
@@ -9258,7 +9280,7 @@ module.exports = (() => {
92589280
},
92599281

92609282
/**
9261-
* Attempts to guess the lock timezone.
9283+
* Attempts to guess the timezone of the current computer.
92629284
*
92639285
* @public
92649286
* @static

lib/meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module.exports = (() => {
22
'use strict';
33

44
return {
5-
version: '5.7.1'
5+
version: '5.7.2'
66
};
77
})();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@barchart/marketdata-api-js",
3-
"version": "5.7.1",
3+
"version": "5.7.2",
44
"description": "SDK for streaming market data from Barchart.com",
55
"author": {
66
"name": "Eero Pikat",

test/dist/barchart-marketdata-api-tests-5.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3113,7 +3113,9 @@ module.exports = (() => {
31133113
const putCallCharacter = getPutCallCharacter(definition.option_type);
31143114

31153115
if (definition.root.length < 3) {
3116-
const putCallCharacterCode = putCallCharacter.charCodeAt(0);
3116+
const putCallCharacterCode = putCallCharacter.charCodeAt(0); // 2021/01/02, BRI. Per Tom, symbols (for the same instrument) change each year.
3117+
// The letter D, E, F are calls (+1, +2, +3 years, respectively).
3118+
31173119
converted = `${definition.root}${definition.month}${definition.strike}${String.fromCharCode(putCallCharacterCode + definition.year - getCurrentYear())}`;
31183120
} else {
31193121
converted = `${definition.root}${definition.month}${getYearDigits(definition.year, 1)}|${definition.strike}${putCallCharacter}`;
@@ -18193,10 +18195,10 @@ describe('When getting a producer symbol', () => {
1819318195
expect(SymbolParser.getProducerSymbol('ZWK465C')).toEqual('ZWK465C');
1819418196
});
1819518197
it('ZWK29465C should map to ZWK465L', () => {
18196-
expect(SymbolParser.getProducerSymbol('ZWK29465C')).toEqual('ZWK465L');
18198+
expect(SymbolParser.getProducerSymbol('ZWK29465C')).toEqual('ZWK465K');
1819718199
});
1819818200
it('ZWK9|465P should map to ZWK465Y', () => {
18199-
expect(SymbolParser.getProducerSymbol('ZWK9|465P')).toEqual('ZWK465Y');
18201+
expect(SymbolParser.getProducerSymbol('ZWK9|465P')).toEqual('ZWK465X');
1820018202
});
1820118203
it('BZ6N8|25C should map to BZ6N8|25C', () => {
1820218204
expect(SymbolParser.getProducerSymbol('BZ6N8|25C')).toEqual('BZ6N8|25C');

0 commit comments

Comments
 (0)