cms/app-client/app/helpers/to-minutes.js
author ymh <ymh.work@gmail.com>
Sat, 06 Aug 2016 21:27:53 +0700
changeset 260 64caee7ce38d
parent 211 7451203a1321
permissions -rw-r--r--
Split document model in document and document results

import Ember from 'ember';

export function toMinutes(params) {
    var seconds = (params[0] % 60).toFixed(0);
    return Math.floor(params[0] / 60) + ":" + (seconds < 10 ? '0' : '') + seconds;
}

export default Ember.Helper.helper(toMinutes);