From cd4efcb57782de6ce43389952d00b597c78ec165 Mon Sep 17 00:00:00 2001 From: Spencer Churchill Date: Sun, 25 Sep 2022 14:36:53 -0700 Subject: [PATCH] dont buzz on sunday --- apps/twenties/boot.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/twenties/boot.js b/apps/twenties/boot.js index 180f4cbb7..722af43bc 100644 --- a/apps/twenties/boot.js +++ b/apps/twenties/boot.js @@ -2,12 +2,13 @@ const move = 20 * 60 * 1000; // 20 minutes const look = 20 * 1000; // 20 seconds - buzz = _ => { + const buzz = _ => { const date = new Date(); const day = date.getDay(); const hour = date.getHours(); // buzz at work - if (day <= 5 && hour >= 8 && hour <= 17) { + if (day >= 1 && day <= 5 && + hour >= 8 && hour <= 17) { Bangle.buzz().then(_ => { setTimeout(Bangle.buzz, look); }); @@ -15,4 +16,4 @@ }; setInterval(buzz, move); // buzz to stand / sit -})(); \ No newline at end of file +})();