The following code:
function getBarDayOfWeek(iBar) {
var dDate = new Date (rawtime(iBar)*1000);
debugPrintln (dDate.getMonth() + "/" + dDate.getDate() + "/" + dDate.getFullYear());
return dDate.getDay();
}
generates "10/17/2010" on today's bars. Why is the month off by 1?
Also, dDate.getYear() returns 110? is this really the years since 1900 instead of 1970 as documented?
function getBarDayOfWeek(iBar) {
var dDate = new Date (rawtime(iBar)*1000);
debugPrintln (dDate.getMonth() + "/" + dDate.getDate() + "/" + dDate.getFullYear());
return dDate.getDay();
}
generates "10/17/2010" on today's bars. Why is the month off by 1?
Also, dDate.getYear() returns 110? is this really the years since 1900 instead of 1970 as documented?
Comment