dont buzz on sunday

pull/2144/head
Spencer Churchill 2022-09-25 14:36:53 -07:00
parent 013685b01d
commit cd4efcb577
1 changed files with 4 additions and 3 deletions

View File

@ -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);
});