(output, value, year, opt)
| 4030 | } |
| 4031 | |
| 4032 | function counter_parse_months_all(output, value, year, opt) { |
| 4033 | var arr = value.trim().split(';'); |
| 4034 | |
| 4035 | for (var i = 1, length = arr.length; i < length; i++) { |
| 4036 | var val = arr[i].substring(5); |
| 4037 | var key = year + arr[i].substring(0, 2); |
| 4038 | |
| 4039 | if (!output[key]) { |
| 4040 | output[key] = opt.type2 ? counter_minmax(opt, val) : +val; |
| 4041 | continue; |
| 4042 | } |
| 4043 | |
| 4044 | switch (opt.type2 || opt.type) { |
| 4045 | case 'max': |
| 4046 | var a = counter_minmax(opt, val); |
| 4047 | if (output[year] < a) |
| 4048 | output[year] = a; |
| 4049 | break; |
| 4050 | case 'min': |
| 4051 | var a = counter_minmax(opt, val); |
| 4052 | if (output[year] > a) |
| 4053 | output[year] = a; |
| 4054 | break; |
| 4055 | case 'sum': |
| 4056 | output[key] += +val; |
| 4057 | break; |
| 4058 | } |
| 4059 | } |
| 4060 | } |
| 4061 | |
| 4062 | function counter_parse_days_all(output, value, year, opt) { |
| 4063 | var arr = value.trim().split(';'); |
no test coverage detected