(output, value, year, opt)
| 4060 | } |
| 4061 | |
| 4062 | function counter_parse_days_all(output, value, year, opt) { |
| 4063 | var arr = value.trim().split(';'); |
| 4064 | for (var i = 1, length = arr.length; i < length; i++) { |
| 4065 | var val = arr[i].substring(5); |
| 4066 | var key = year + arr[i].substring(0, 4); |
| 4067 | |
| 4068 | if (!output[key]) { |
| 4069 | output[key] = opt.type2 ? counter_minmax(opt, val) : +val; |
| 4070 | continue; |
| 4071 | } |
| 4072 | |
| 4073 | switch (opt.type2 || opt.type) { |
| 4074 | case 'max': |
| 4075 | var a = counter_minmax(opt, val); |
| 4076 | if (output[year] < a) |
| 4077 | output[year] = a; |
| 4078 | break; |
| 4079 | case 'min': |
| 4080 | var a = counter_minmax(opt, val); |
| 4081 | if (output[year] > a) |
| 4082 | output[year] = a; |
| 4083 | break; |
| 4084 | case 'sum': |
| 4085 | output[key] += +val; |
| 4086 | break; |
| 4087 | } |
| 4088 | } |
| 4089 | } |
| 4090 | |
| 4091 | CP.save = function() { |
| 4092 | var self = this; |
no test coverage detected