minor optimization in calendar day rendering: date comparison is heavier than just checking the size

This commit is contained in:
Hannes Wallnöfer 2001-08-23 20:00:44 +00:00
parent bf460b7791
commit c6a2133635

View file

@ -3,7 +3,6 @@
*/
function renderCalendarDay(currGroupname,text) {
var now = new Date();
var currGroup = this.get(currGroupname);
var linkit = false;
if (currGroup && currGroup.size()) {
@ -11,7 +10,6 @@ function renderCalendarDay(currGroupname,text) {
linkit = true;
else {
linkit = false;
if (currGroupname <= now.format("yyyyMMdd")) {
for (var i=0;i<currGroup.size();i++) {
var st = currGroup.get(i);
if (st.isOnline() || st.isViewAllowed()) {
@ -20,7 +18,6 @@ function renderCalendarDay(currGroupname,text) {
}
}
}
}
if (linkit) {
var text = "<a href=\"" + currGroup.href() + "\">" + text + "</a>";
}