function addInterval(interval) {
            numberDate[interval + "sFromNow"] = function (val) {
                return date.add(new Date(), interval, val);
            };
            numberDate[interval + "sAgo"] = function (val) {
                return date.add(new Date(), interval, -val);
            };
        }
Formats a date to the specidifed format string

@example

var date = new Date(2006, 7, 11, 0, 55, 12, 345);
dateExtender.format(date, "EEEE, MMMM dd, yyyy"); //"Friday, August 11, 2006"
dateExtender.format(date, "M/dd/yy"); //"8/11/06"
dateExtender.format(date, "E"); //"6"
dateExtender.format(date, "h:m a"); //"12:55 AM"
dateExtender.format(date, 'h:m:s'); //"12:55:12"
dateExtender.format(date, 'h:m:s.SS'); //"12:55:12.35"
dateExtender.format(date, 'k:m:s.SS'); //"24:55:12.35"
dateExtender.format(date, 'H:m:s.SS'); //"0:55:12.35"
dateExtender.format(date, "ddMMyyyy"); //"11082006"

@param date the date to format
@param {String} format the format of the date composed of the following options
<ul>
                 <li> G    Era designator    Text    AD</li>
                 <li> y    Year    Year    1996; 96</li>
                 <li> M    Month in year    Month    July; Jul; 07</li>
                 <li> w    Week in year    Number    27</li>
                 <li> W    Week in month    Number    2</li>
                 <li> D    Day in year    Number    189</li>
                 <li> d    Day in month    Number    10</li>
                 <li> E    Day in week    Text    Tuesday; Tue</li>
                 <li> a    Am/pm marker    Text    PM</li>
                 <li> H    Hour in day (0-23)    Number    0</li>
                 <li> k    Hour in day (1-24)    Number    24</li>
                 <li> K    Hour in am/pm (0-11)    Number    0</li>
                 <li> h    Hour in am/pm (1-12)    Number    12</li>
                 <li> m    Minute in hour    Number    30</li>
                 <li> s    Second in minute    Number    55</li>
                 <li> S    Millisecond    Number    978</li>
                 <li> z    Time zone    General time zone    Pacific Standard Time; PST; GMT-08:00</li>
                 <li> Z    Time zone    RFC 822 time zone    -0800 </li>
</ul>