Commit 7d76c8a0 by Manzar Hussain

remove js

parent d8d172db
...@@ -241,108 +241,7 @@ ...@@ -241,108 +241,7 @@
}); });
} }
const settings = {
"async": true,
"crossDomain": true,
"url": "https://apidojo-yahoo-finance-v1.p.rapidapi.com/stock/v2/get-financials?symbol=DICIND.BO&region=IN",
"method": "GET",
"headers": {
"x-rapidapi-key": "71595d71fdmsh59db2218deaaf67p15e9e8jsnca220a779910",
"x-rapidapi-host": "apidojo-yahoo-finance-v1.p.rapidapi.com"
}
};
$.ajax(settings).done(function (response) {
$('#bse').text("BSE:"+response.price.regularMarketPrice.fmt);
var regularMarketChange = response.price.regularMarketChange.fmt;
var regularMarketChangePercent = response.price.regularMarketChangePercent.fmt;
let unix_timestamp = response.price.regularMarketTime;
// Create a new JavaScript Date object based on the timestamp
// multiplied by 1000 so that the argument is in milliseconds, not seconds.
var date = new Date(unix_timestamp * 1000);
// Hours part from the timestamp
var hours = date.getHours();
// Minutes part from the timestamp
var minutes = "0" + date.getMinutes();
// Seconds part from the timestamp
var seconds = "0" + date.getSeconds();
// Will display time in 10:30:23 format
var formattedTime = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);
$('#bse_time_stock').text(formattedTime+" IST "+regularMarketChange+" "+regularMarketChangePercent)
if(regularMarketChangePercent.substring(0,1)=='-')
{
$('#bse').parent('li').addClass('down');
}
else
{
$('#bse').parent('li').removeClass('down');
}
});
const settings1 = {
"async": true,
"crossDomain": true,
"url": "https://apidojo-yahoo-finance-v1.p.rapidapi.com/stock/v2/get-financials?symbol=DICIND.NS&region=IN",
"method": "GET",
"headers": {
"x-rapidapi-key": "71595d71fdmsh59db2218deaaf67p15e9e8jsnca220a779910",
"x-rapidapi-host": "apidojo-yahoo-finance-v1.p.rapidapi.com"
}
};
$.ajax(settings1).done(function (response) {
$('#nse').text("NSE:"+response.price.regularMarketPrice.fmt);
var regularMarketChange = response.price.regularMarketChange.fmt;
var regularMarketChangePercent = response.price.regularMarketChangePercent.fmt;
let unix_timestamp = response.price.regularMarketTime;
// Create a new JavaScript Date object based on the timestamp
// multiplied by 1000 so that the argument is in milliseconds, not seconds.
var date = new Date(unix_timestamp * 1000);
// Hours part from the timestamp
var hours = date.getHours();
// Minutes part from the timestamp
var minutes = "0" + date.getMinutes();
// Seconds part from the timestamp
var seconds = "0" + date.getSeconds();
// Will display time in 10:30:23 format
var formattedTime = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);
$('#nse_time_stock').text(formattedTime+" IST "+regularMarketChange+" "+regularMarketChangePercent)
if(regularMarketChangePercent.substring(0,1)=='-')
{
$('#nse').parent('li').addClass('down');
}
else
{
$('#nse').parent('li').removeClass('down');
}
let unix_date_timestamp = unix_timestamp;
// Create a new JavaScript Date object based on the timestamp
// multiplied by 1000 so that the argument is in milliseconds, not seconds.
var date1 = new Date(unix_date_timestamp * 1000);
var date = date1.getDate();
var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var month = date1.getMonth();
var year = date1.getFullYear();
var full_year = date+" "+months[month]+" "+year;
$('#latest_update').text("Latest updated on " + full_year);
$(".outer-loader").fadeOut("slow");
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment