Adding in function frome OEone, removing useless calendar window variable.

This commit is contained in:
mikep%oeone.com 2002-10-02 19:45:48 +00:00
Родитель 2feea90d7c
Коммит b6979bc41b
1 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -80,7 +80,7 @@ DateUtils.getLastDayOfMonth = function( year, month )
function DateFormater( CalendarWindow )
function DateFormater( )
{
// we get the date bundle in case the locale changes, can
// we be notified of a locale change instead, then we could
@ -88,7 +88,6 @@ function DateFormater( CalendarWindow )
this.dateStringBundle = srGetStrBundle("chrome://calendar/locale/dateFormat.properties");
this.CalendarWindow = CalendarWindow;
}
@ -142,6 +141,21 @@ DateFormater.prototype.getShortFormatedDate = function( date )
}
DateFormater.prototype.getFormatedDateWithoutYear = function( date )
{
// Format the date using a hardcoded format for now, since everything
// that displays the date uses this function we will be able to
// make a user settable date format and use it here.
var oneBasedMonthNum = date.getMonth() + 1;
var monthString = this.dateStringBundle.GetStringFromName("month." + oneBasedMonthNum + ".Mmm" );
var dateString = monthString + " " + date.getDate();
return dateString;
}
// 0-11 Month Index
DateFormater.prototype.getMonthName = function( monthIndex )