lib/kissy/5.0.0-alpha.3/lib/build/date/format.js
function (calendar) {
            var time = calendar.getTime();
            calendar = /**@type {KISSY.Date.Gregorian}
         @ignore*/
            new GregorianCalendar(this.timezoneOffset, this.locale);
            calendar.setTime(time);
            var i, ret = [], pattern = this.pattern, len = pattern.length;
            for (i = 0; i < len; i++) {
                var comp = pattern[i];
                if (comp.text) {
                    ret.push(comp.text);
                } else if ('field' in comp) {
                    ret.push(formatField(comp.field, comp.count, this.locale, calendar));
                }
            }
            return ret.join('');
        }
function (calendar) {
            var time = calendar.getTime();
            calendar = /**@type {KISSY.Date.Gregorian}
         @ignore*/
            new GregorianCalendar(this.timezoneOffset, this.locale);
            calendar.setTime(time);
            var i, ret = [], pattern = this.pattern, len = pattern.length;
            for (i = 0; i < len; i++) {
                var comp = pattern[i];
                if (comp.text) {
                    ret.push(comp.text);
                } else if ('field' in comp) {
                    ret.push(formatField(comp.field, comp.count, this.locale, calendar));
                }
            }
            return ret.join('');
        }
function ( calendar ) { var time = calendar . getTime ( ) ; calendar = /**@type {KISSY.Date.Gregorian}
         @ignore*/ new GregorianCalendar ( this . timezoneOffset , this . locale ) ; calendar . setTime ( time ) ; var i , ret = [ ] , pattern = this . pattern , len = pattern . length ; for ( i = 0 ; i < len ; i ++ ) { var comp = pattern [ i ] ; if ( comp . text ) { ret . push ( comp . text ) ; } else if ( 'field' in comp ) { ret . push ( formatField ( comp . field , comp . count , this . locale , calendar ) ) ; } } return ret . join ( '' ) ; }
format a GregorianDate instance according to specified pattern
@param {KISSY.Date.Gregorian} calendar GregorianDate instance
@returns {string} formatted string of GregorianDate instance
format a GregorianDate instance according to specified pattern