cms/app-client/app/helpers/to-minutes.js
author ymh <ymh.work@gmail.com>
Wed, 08 Feb 2017 15:25:24 +0100
changeset 502 74fba571487e
parent 211 7451203a1321
permissions -rw-r--r--
Complete the notice display. add various fields to document to correctly display the notice. Correct bug #0025746

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