Problem with formatters, getting week number

The only code I have written so far is the formatter code:
I am not parsing a value to the js yet as it is not working at this stage.

    dmx.Formatter('string', {
    getWeek: function (val) {
        return moment(val).week()
    }
});

I got this from

It uses dmx.Formatter not dmx.Formatters

I have also replaced dmx.Formatter with dmx.Formatters with no joy.