offsetString = function(offset) {
            try {
              return calendar.parseDate(dateFormat, offset, settings);
            } catch (e) {
            }
            offset = offset.toLowerCase();
            var date = (offset.match(/^c/) && currentDate ? currentDate.newDate() : null) || calendar.today();
            var pattern = /([+-]?[0-9]+)\s*(d|w|m|y)?/g;
            var matches = pattern.exec(offset);
            while (matches) {
              date.add(parseInt(matches[1], 10), matches[2] || "d");
              matches = pattern.exec(offset);
            }
            return date;
          }
A date may be specified as an exact value or a relative one.
            Found in the <code>jquery.calendars.plus.js</code> module.
            @memberof BaseCalendar
            @param dateSpec {CDate|number|string} The date as an object or string in the given format or
                    an offset - numeric days from today, or string amounts and periods, e.g. '+1m +2w'.
            @param defaultDate {CDate} The date to use if no other supplied, may be <code>null</code>.
            @param currentDate {CDate} The current date as a possible basis for relative dates,
                    if <code>null</code> today is used (optional)
            @param [dateFormat] {string} The expected date format - see <a href="#formatDate"><code>formatDate</code></a>.
            @param [settings] {object} Additional options whose attributes include:
            @property [shortYearCutoff] {number} The cutoff year for determining the century.
            @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.
            @return {CDate} The decoded date.