397460 - [Today Pane] MiniDay does not change date on crossing midnight boundary;r=dbo

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@236706 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
Berend.Cornelius%sun.com
2007-09-26 11:41:10 +00:00
parent 0dc80519ad
commit a486e1cc26
2 changed files with 15 additions and 3 deletions

View File

@@ -295,6 +295,11 @@ setDaywithjsDate: function(aNewDate)
{
return (sameDay(today(), this.start));
},
showsYesterday: function()
{
return (sameDay(yesterday(), this.start));
},
updatePeriod: function()
{

View File

@@ -187,6 +187,13 @@ function today()
return d.getInTimezone(calendarDefaultTimezone());
}
function yesterday()
{
var d = today();
d.day--;
return d;
}
function nextMonth(dt)
{
var d = new Date(dt);
@@ -448,11 +455,11 @@ function refreshUIBits() {
cView.goToDay(cView.selectedDay);
}
// schedule our next update...
scheduleMidnightUpdate(refreshUIBits);
if (TodayPane.showsToday()) {
if (TodayPane.showsYesterday()) {
TodayPane.setDay(today());
}
// schedule our next update...
scheduleMidnightUpdate(refreshUIBits);
}
function showCalendarView(type)