Don't use octals

pull/3187/head
Anton 2024-02-10 16:06:41 +01:00
parent 49fbc6a252
commit 9179747785
5 changed files with 19 additions and 20 deletions

View File

@ -148,7 +148,6 @@
"no-empty": "off",
"no-global-assign": "off",
"no-inner-declarations": "off",
"no-octal": "off",
"no-prototype-builtins": "off",
"no-redeclare": "off",
"no-unreachable": "warn",

View File

@ -70,7 +70,7 @@ function drawSimpleClock() {
var dom = new Date(d.getFullYear(), d.getMonth()+1, 0).getDate();
//Days since full moon
var knownnew = new Date(2020,02,24,09,28,0);
var knownnew = new Date(2020,2,24,9,28,0);
// Get millisecond difference and divide down to cycles
var cycles = (d.getTime()-knownnew.getTime())/1000/60/60/24/29.53;

View File

@ -20,17 +20,17 @@ const allWords = [
const timeOfDay = {
0: ["", 0, 0],
1: ["EARLYMORNING", 10, 20, 30, 40, 50, 02, 12, 22, 32, 42, 52, 62],
2: ["MORNING", 02, 12, 22, 32, 42, 52, 62],
3: ["LATEMORNING", 01, 11, 21, 31, 02, 12, 22, 32, 42, 52, 62],
1: ["EARLYMORNING", 10, 20, 30, 40, 50, 2, 12, 22, 32, 42, 52, 62],
2: ["MORNING", 2, 12, 22, 32, 42, 52, 62],
3: ["LATEMORNING", 1, 11, 21, 31, 2, 12, 22, 32, 42, 52, 62],
4: ["MIDDAY", 13, 23, 33, 54, 64, 74],
5: ["EARLYAFTERNOON", 10, 20, 30, 40, 50, 04, 14, 24, 34, 44, 70, 71, 72, 73],
6: ["AFTERNOON", 04, 14, 24, 34, 44, 70, 71, 72, 73],
7: ["LATEAFTERNOON", 01, 11, 21, 31, 04, 14, 24, 34, 44, 70, 71, 72, 73],
8: ["EARLYEVENING", 10, 20, 30, 40, 50, 06, 16, 26, 36, 46, 56, 66],
9: ["EVENING", 06, 16, 26, 36, 46, 56, 66],
5: ["EARLYAFTERNOON", 10, 20, 30, 40, 50, 4, 14, 24, 34, 44, 70, 71, 72, 73],
6: ["AFTERNOON", 4, 14, 24, 34, 44, 70, 71, 72, 73],
7: ["LATEAFTERNOON", 1, 11, 21, 31, 4, 14, 24, 34, 44, 70, 71, 72, 73],
8: ["EARLYEVENING", 10, 20, 30, 40, 50, 6, 16, 26, 36, 46, 56, 66],
9: ["EVENING", 6, 16, 26, 36, 46, 56, 66],
10: ["NIGHT", 37, 47, 57, 67, 77],
11: ["MIDDLEOFTHENIGHT", 13, 23, 33, 43, 53, 63, 05, 15, 45, 55, 65, 37,47,57,67,77 ],
11: ["MIDDLEOFTHENIGHT", 13, 23, 33, 43, 53, 63, 5, 15, 45, 55, 65, 37,47,57,67,77 ],
};

View File

@ -248,7 +248,7 @@ function handleState(fastUpdate){
*/
var minutes = state.currentDate.getMinutes();
var hours = state.currentDate.getHours();
if(!isAlarmEnabled() && fastUpdate && hours == 00 && minutes == 01){
if(!isAlarmEnabled() && fastUpdate && hours == 0 && minutes == 1){
state.sleep = true;
return;
}

View File

@ -12,24 +12,24 @@ const allWords = [
const hours = {
0: ["", 0, 0],
1: ["ONE", 17, 47, 77],
2: ["TWO", 06, 16, 17],
2: ["TWO", 6, 16, 17],
3: ["THREE", 35, 45, 55, 65, 75],
4: ["FOUR", 07, 17, 27, 37],
5: ["FIVE", 04, 14, 24, 34],
6: ["SIX", 05, 15, 25],
7: ["SEVEN", 05, 46, 56, 66, 67],
4: ["FOUR", 7, 17, 27, 37],
5: ["FIVE", 4, 14, 24, 34],
6: ["SIX", 5, 15, 25],
7: ["SEVEN", 5, 46, 56, 66, 67],
8: ["EIGHT", 34, 44, 54, 64, 74],
9: ["NINE", 47, 57, 67, 77],
10: ["TEN", 74, 75, 76],
11: ["ELEVEN", 26, 36, 46, 56, 66, 76],
12: ["TWELVE", 06, 16, 26, 36, 56, 66]
12: ["TWELVE", 6, 16, 26, 36, 56, 66]
};
const mins = {
0: ["A", 0, 0],
1: ["FIVE", 02, 12, 22, 32],
1: ["FIVE", 2, 12, 22, 32],
2: ["TEN", 10, 30, 40],
3: ["QUARTER", 01, 11, 21, 31, 41, 51, 61],
3: ["QUARTER", 1, 11, 21, 31, 41, 51, 61],
4: ["TWENTY", 10, 20, 30, 40, 50, 60],
5: ["HALF", 42, 52, 62, 72],
6: ["PAST", 13, 23, 33, 43],