diff --git a/mozilla/calendar/resources/content/dateUtils.js b/mozilla/calendar/resources/content/dateUtils.js index e4ebf422a6b..32041a6a337 100644 --- a/mozilla/calendar/resources/content/dateUtils.js +++ b/mozilla/calendar/resources/content/dateUtils.js @@ -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 )