Skip to content

Commit 6ed9fe7

Browse files
committed
bug fixes
1 parent c218b10 commit 6ed9fe7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

algo/validation/convertsymbol.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ConvertToSymbol extends StringUDF {
6666
//YEAR MONTHINDEX DATE STRIKE CE/PE
6767
//2021 1 07 14000 CE
6868
var monthIndex = months.findIndex(element => element === scrip[2]);
69-
ex = `${scrip[3]}${monthIndex}` + `0${scrip[1]}`.slice(-2) + `${Number(scrip[4])}${scrip[5]}`;
69+
ex = `${scrip[3]}${Number(monthIndex)}` + `0${scrip[1]}`.slice(-2) + `${Number(scrip[4])}${scrip[5]}`;
7070
} else {
7171
ex = `${scrip[2]}${scrip[1]}${Number(scrip[3])}${scrip[4]}`;
7272
}

example/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const insertInToArray = () => {
2424
}
2525

2626
const convertToTradingSymbol = () => {
27-
let output = udf.convertToTradingSymbol('USDINR AUG 74.50 PE');
27+
let output = udf.convertToTradingSymbol('USDINR 6 AUG 74.25 PE');
2828
console.log(output);
2929
}
3030

0 commit comments

Comments
 (0)