dist/dust-intl.js
/**
        Interprets `params.val` as a date or time to format and uses the custom `time`
        formats.
        @method formatTime
        @param {Object} chunk The dust Chunk object.
        @param {Object} context The dust Context object.
        @param {Object} bodies An object containing the dust bodies.
        @param {Object} params An object containing the parameters in the markup for this helper.
        @return {Object} The `chunk` parameter.
        */
Interprets `params.val` as a date or time to format and uses the custom `time`
formats.
Interprets ` params . val ` as a date or time to format and uses the custom ` time ` formats .
function formatTime(chunk, context, bodies, params) {
            var formatOptions,
                locales,
                val,
                formatter;
            params = params || {};
            if (!params.hasOwnProperty('val')) {
                throw new ReferenceError('@formatTime needs a `val` parameter');
            }
            val = $$utils$$tap(params.val, chunk, context);
            delete params.val;  
            val = new Date(val);
            $$utils$$assertIsDate(val, '@formatTime requires a valid date or timestamp `val`');
            formatOptions = $$utils$$getFormatOptions('time', chunk, params, context);
            locales = $$utils$$getLocales(chunk, params, context);
            formatter = $$helpers$$getDateTimeFormat(locales, formatOptions);
            chunk.write(dust.escapeHtml(formatter.format(val)));
            return chunk;
        }
function formatTime ( chunk , context , bodies , params ) { var formatOptions , locales , val , formatter ; params = params || { } ; if ( ! params . hasOwnProperty ( 'val' ) ) { throw new ReferenceError ( '@formatTime needs a `val` parameter' ) ; } val = $$utils$$tap ( params . val , chunk , context ) ; delete params . val ; val = new Date ( val ) ; $$utils$$assertIsDate ( val , '@formatTime requires a valid date or timestamp `val`' ) ; formatOptions = $$utils$$getFormatOptions ( 'time' , chunk , params , context ) ; locales = $$utils$$getLocales ( chunk , params , context ) ; formatter = $$helpers$$getDateTimeFormat ( locales , formatOptions ) ; chunk . write ( dust . escapeHtml ( formatter . format ( val ) ) ) ; return chunk ; }
Interprets `params.val` as a date or time to format and uses the custom `time`
formats.
Interprets ` params . val ` as a date or time to format and uses the custom ` time ` formats .
// since params might be interpretted as format options