1
0
Fork 0
forked from 0x2620/oxjs

use Ox.break

This commit is contained in:
rolux 2012-05-22 09:11:26 +02:00
commit 04784630d3
42 changed files with 117 additions and 118 deletions

View file

@ -337,7 +337,7 @@ Ox.formatDateRangeDuration = function(start, end, utc) {
keys = ['year', 'month', 'day', 'hour', 'minute', 'second'],
parts = ['FullYear', 'Month', 'Date', 'Hours', 'Minutes', 'Seconds'],
values = [];
Ox.forEach(keys, function(key, i) {
keys.forEach(function(key, i) {
while (true) {
if (key == 'month') {
// set the day to the same day in the next month,
@ -574,7 +574,7 @@ Ox.formatValue = function(num, str, bin) {
if (num < Math.pow(base, i + 1) || i == len - 1) {
val = Ox.formatNumber(num / Math.pow(base, i), i ? i - 1 : 0) +
' ' + chr + (chr && bin ? 'i' : '') + str;
return false;
Ox.break();
}
});
return val;