lib/kissy/5.0.0-alpha.3/lib/build/date/format.js
function (dateStyle, timeStyle, locale, timeZoneOffset) {
            locale = locale || defaultLocale;
            var datePattern = '';
            if (dateStyle !== undefined) {
                datePattern = locale.datePatterns[dateStyle];
            }
            var timePattern = '';
            if (timeStyle !== undefined) {
                timePattern = locale.timePatterns[timeStyle];
            }
            var pattern = datePattern;
            if (timePattern) {
                if (datePattern) {
                    pattern = util.substitute(locale.dateTimePattern, {
                        date: datePattern,
                        time: timePattern
                    });
                } else {
                    pattern = timePattern;
                }
            }
            return new DateTimeFormat(pattern, locale, timeZoneOffset);
        }
function (dateStyle, timeStyle, locale, timeZoneOffset) {
            locale = locale || defaultLocale;
            var datePattern = '';
            if (dateStyle !== undefined) {
                datePattern = locale.datePatterns[dateStyle];
            }
            var timePattern = '';
            if (timeStyle !== undefined) {
                timePattern = locale.timePatterns[timeStyle];
            }
            var pattern = datePattern;
            if (timePattern) {
                if (datePattern) {
                    pattern = util.substitute(locale.dateTimePattern, {
                        date: datePattern,
                        time: timePattern
                    });
                } else {
                    pattern = timePattern;
                }
            }
            return new DateTimeFormat(pattern, locale, timeZoneOffset);
        }
function ( dateStyle , timeStyle , locale , timeZoneOffset ) { locale = locale || defaultLocale ; var datePattern = '' ; if ( dateStyle !== undefined ) { datePattern = locale . datePatterns [ dateStyle ] ; } var timePattern = '' ; if ( timeStyle !== undefined ) { timePattern = locale . timePatterns [ timeStyle ] ; } var pattern = datePattern ; if ( timePattern ) { if ( datePattern ) { pattern = util . substitute ( locale . dateTimePattern , { date : datePattern , time : timePattern } ) ; } else { pattern = timePattern ; } } return new DateTimeFormat ( pattern , locale , timeZoneOffset ) ; }
get a formatter instance of specified date style and time style.
@param {KISSY.Date.Formatter.Style} dateStyle date format style
@param {KISSY.Date.Formatter.Style} timeStyle time format style
@param {Object} locale
@param {Number} timeZoneOffset time zone offset by minutes
@returns {KISSY.Date.Gregorian}
@static
get a formatter instance of specified date style and time style .