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

git-svn-id: svn://10.0.0.236/trunk@131016 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mikep%oeone.com 2002-10-02 19:45:48 +00:00
parent 130151f08f
commit e6d2d2af50

View File

@ -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 )