Comparison

plugins/mod_storage_internal.lua @ 10844:05f4386c846e

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Fri, 15 May 2020 21:26:54 +0200
parent 10842:5a6ba2f38e2b
parent 10843:8fcd46ee9bf5
child 10926:c55bd98a54f8
comparison
equal deleted inserted replaced
10842:5a6ba2f38e2b 10844:05f4386c846e
148 return item.with == query.with; 148 return item.with == query.with;
149 end); 149 end);
150 end 150 end
151 if query.start then 151 if query.start then
152 items:filter(function (item) 152 items:filter(function (item)
153 return item.when >= query.start; 153 local when = item.when or datetime.parse(item.attr.stamp);
154 return when >= query.start;
154 end); 155 end);
155 end 156 end
156 if query["end"] then 157 if query["end"] then
157 items:filter(function (item) 158 items:filter(function (item)
158 return item.when <= query["end"]; 159 local when = item.when or datetime.parse(item.attr.stamp);
160 return when <= query["end"];
159 end); 161 end);
160 end 162 end
161 if query.total then 163 if query.total then
162 count = #items; 164 count = #items;
163 end 165 end