doubled = function(match, step) {
            var matches = 1;
            while (iFormat + matches < format.length && format.charAt(iFormat + matches) === match) {
              matches++;
            }
            iFormat += matches - 1;
            return Math.floor(matches / (step || 1)) > 1;
          }
Format a date object into a string value.
            The format can be combinations of the following:
            <ul>
            <li>d  - day of month (no leading zero)</li>
            <li>dd - day of month (two digit)</li>
            <li>o  - day of year (no leading zeros)</li>
            <li>oo - day of year (three digit)</li>
            <li>D  - day name short</li>
            <li>DD - day name long</li>
            <li>w  - week of year (no leading zero)</li>
            <li>ww - week of year (two digit)</li>
            <li>m  - month of year (no leading zero)</li>
            <li>mm - month of year (two digit)</li>
            <li>M  - month name short</li>
            <li>MM - month name long</li>
            <li>yy - year (two digit)</li>
            <li>yyyy - year (four digit)</li>
            <li>YYYY - formatted year</li>
            <li>J  - Julian date (days since January 1, 4713 BCE Greenwich noon)</li>
            <li>@  - Unix timestamp (s since 01/01/1970)</li>
            <li>!  - Windows ticks (100ns since 01/01/0001)</li>
            <li>'...' - literal text</li>
            <li>'' - single quote</li>
            </ul>
            Found in the <code>jquery.calendars.plus.js</code> module.
            @memberof BaseCalendar
            @param [format] {string} The desired format of the date (defaults to calendar format).
            @param date {CDate} The date value to format.
            @param [settings] {object} Addition options, whose attributes include:
            @property [dayNamesShort] {string[]} Abbreviated names of the days from Sunday.
            @property [dayNames] {string[]} Names of the days from Sunday.
            @property [monthNamesShort] {string[]} Abbreviated names of the months.
            @property [monthNames] {string[]} Names of the months.
            @property [calculateWeek] {CalendarsPickerCalculateWeek} Function that determines week of the year.
            @property [localNumbers=false] {boolean} <code>true</code> to localise numbers (if available),
                      <code>false</code> to use normal Arabic numerals.
            @return {string} The date in the above format.
            @throws Errors if the date is from a different calendar.