mirror of https://github.com/espruino/BangleApps
dont buzz on sunday
parent
013685b01d
commit
cd4efcb577
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue