1 |
3a515b92
|
cagy
|
'use strict';
|
2 |
|
|
|
3 |
|
|
var GetIntrinsic = require('../GetIntrinsic');
|
4 |
|
|
|
5 |
|
|
var $floor = GetIntrinsic('%Math.floor%');
|
6 |
|
|
|
7 |
|
|
var mod = require('../helpers/mod');
|
8 |
|
|
var timeConstants = require('../helpers/timeConstants');
|
9 |
|
|
var msPerMinute = timeConstants.msPerMinute;
|
10 |
|
|
var MinutesPerHour = timeConstants.MinutesPerHour;
|
11 |
|
|
|
12 |
|
|
// https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.10
|
13 |
|
|
|
14 |
|
|
module.exports = function MinFromTime(t) {
|
15 |
|
|
return mod($floor(t / msPerMinute), MinutesPerHour);
|
16 |
|
|
};
|