Skip to content

Commit daafdc8

Browse files
committed
health 0.34: Fix readFullDatabase (was skipping first month of data)
1 parent 1c69208 commit daafdc8

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

apps/health/ChangeLog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@
3636
Added graphs for Temperature and Battery
3737
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
3838
0.33: Ensure readAllRecordsSince always includes the current day
39-
Speed improvements (put temporary functions in RAM where possible)
39+
Speed improvements (put temporary functions in RAM where possible)
40+
0.34: Fix readFullDatabase (was skipping first month of data)

apps/health/lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ exports.readFullDatabase = function(cb) {
114114
require("Storage").list(/health-[0-9]+-[0-9]+.raw/).forEach(val => {
115115
var parts = val.split('-');
116116
var y = parseInt(parts[1],10);
117-
var mo = parseInt(parts[2].replace('.raw', ''),10);
117+
var mo = parseInt(parts[2].replace('.raw', ''),10) - 1;
118118
exports.readAllRecords(new Date(y, mo, 1), (r) => {"ram";
119119
r.date = new Date(y, mo, r.day, r.hr, r.min);
120120
cb(r);

apps/health/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "health",
33
"name": "Health Tracking",
44
"shortName": "Health",
5-
"version": "0.33",
5+
"version": "0.34",
66
"description": "Logs health data and provides an app to view it",
77
"icon": "app.png",
88
"tags": "tool,system,health",

0 commit comments

Comments
 (0)