(output, value, year, opt)
| 4001 | } |
| 4002 | |
| 4003 | function counter_parse_years_all(output, value, year, opt) { |
| 4004 | var arr = value.trim().split(';'); |
| 4005 | for (var i = 1, length = arr.length; i < length; i++) { |
| 4006 | |
| 4007 | var val = arr[i].substring(5); |
| 4008 | |
| 4009 | if (!output[year]) { |
| 4010 | output[year] = opt.type2 ? counter_minmax(opt, val) : +val; |
| 4011 | continue; |
| 4012 | } |
| 4013 | |
| 4014 | switch (opt.type2 || opt.type) { |
| 4015 | case 'max': |
| 4016 | var a = counter_minmax(opt, val); |
| 4017 | if (output[year] < a) |
| 4018 | output[year] = a; |
| 4019 | break; |
| 4020 | case 'min': |
| 4021 | var a = counter_minmax(opt, val); |
| 4022 | if (output[year] > a) |
| 4023 | output[year] = a; |
| 4024 | break; |
| 4025 | case 'sum': |
| 4026 | output[year] += +val; |
| 4027 | break; |
| 4028 | } |
| 4029 | } |
| 4030 | } |
| 4031 | |
| 4032 | function counter_parse_months_all(output, value, year, opt) { |
| 4033 | var arr = value.trim().split(';'); |
no test coverage detected