forked from 0x2620/oxjs
use Ox.break
This commit is contained in:
parent
3d4a79b6a2
commit
04784630d3
42 changed files with 117 additions and 118 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue