Maybe an example will help...
In your formatter you are defining the use of "sap/ui/core/format/DateFormat" and setting it to a variable "DateFormat" which is available to your class and can be used as
cashDiscountState: function (date) {
var test = DateFormat.calculateWeekNumber(date);
...
}
Regards,
Jamie
SAP - Technology RIG