health 0.34: Fix readFullDatabase (was skipping first month of data)

master
Gordon Williams 2025-07-01 11:39:22 +01:00
parent 1c69208886
commit daafdc8a6b
3 changed files with 4 additions and 3 deletions

View File

@ -36,4 +36,5 @@
Added graphs for Temperature and Battery
0.32: If getting HRM every 3/10 minutes, don't turn it on if the Bangle is charging or hasn't moved and is face down/up
0.33: Ensure readAllRecordsSince always includes the current day
Speed improvements (put temporary functions in RAM where possible)
Speed improvements (put temporary functions in RAM where possible)
0.34: Fix readFullDatabase (was skipping first month of data)

View File

@ -114,7 +114,7 @@ exports.readFullDatabase = function(cb) {
require("Storage").list(/health-[0-9]+-[0-9]+.raw/).forEach(val => {
var parts = val.split('-');
var y = parseInt(parts[1],10);
var mo = parseInt(parts[2].replace('.raw', ''),10);
var mo = parseInt(parts[2].replace('.raw', ''),10) - 1;
exports.readAllRecords(new Date(y, mo, 1), (r) => {"ram";
r.date = new Date(y, mo, r.day, r.hr, r.min);
cb(r);

View File

@ -2,7 +2,7 @@
"id": "health",
"name": "Health Tracking",
"shortName": "Health",
"version": "0.33",
"version": "0.34",
"description": "Logs health data and provides an app to view it",
"icon": "app.png",
"tags": "tool,system,health",