Skip to content

Commit

Permalink
Merge pull request #3187 from atjn/no-octal
Browse files Browse the repository at this point in the history
Don't use octals
  • Loading branch information
bobrippling authored Feb 15, 2024
2 parents d81d5d4 + 9179747 commit 3f8f0f3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
1 change: 0 additions & 1 deletion apps/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion apps/dclock/clock-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
18 changes: 9 additions & 9 deletions apps/impwclock/clock-impword.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ],
};


Expand Down
2 changes: 1 addition & 1 deletion apps/notanalog/notanalog.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
16 changes: 8 additions & 8 deletions apps/wclock/clock-word.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 3f8f0f3

Please sign in to comment.