cms/app-client/app/helpers/to-minutes.js
author ymh <ymh.work@gmail.com>
Tue, 11 Oct 2016 02:49:59 +0200
changeset 326 226d5b17a119
parent 211 7451203a1321
permissions -rw-r--r--
- First implementation of filter for languages. - Language is now an array in the document - various corrections linked to the above change - Simplify the IndexDocumet loop

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);