(seconds, settings)
| 175 | }; |
| 176 | |
| 177 | var roundingFunction = function roundingFunction(seconds, settings) { |
| 178 | if (seconds === null) { |
| 179 | return null; |
| 180 | } |
| 181 | |
| 182 | var i = 0; |
| 183 | var nextVal = 0; |
| 184 | |
| 185 | while (nextVal < seconds) { |
| 186 | i++; |
| 187 | nextVal += settings.step(i) * 60; |
| 188 | } |
| 189 | |
| 190 | var prevVal = nextVal - settings.step(i - 1) * 60; |
| 191 | |
| 192 | if (seconds - prevVal < nextVal - seconds) { |
| 193 | return moduloSeconds(prevVal, settings); |
| 194 | } else { |
| 195 | return moduloSeconds(nextVal, settings); |
| 196 | } |
| 197 | }; |
| 198 | |
| 199 | function moduloSeconds(seconds, settings) { |
| 200 | if (seconds == ONE_DAY && settings.show2400) { |
nothing calls this directly
no test coverage detected