More Rubocopping

This commit is contained in:
Maruno17
2021-12-20 17:18:21 +00:00
parent db4acd3369
commit 33fcbf623b
154 changed files with 1388 additions and 1420 deletions

View File

@@ -154,7 +154,7 @@ def moonphase(time = nil) # in UTC
v = (j - 2451550.1) / 29.530588853
v = ((v - v.floor) + (v < 0 ? 1 : 0))
ag = v * 29.53
for i in 0...transitions.length
transitions.length.times do |i|
return i if ag <= transitions[i]
end
return 0
@@ -177,7 +177,7 @@ def zodiac(month, day)
1, 20, 2, 18, # Aquarius
2, 19, 3, 20 # Pisces
]
for i in 0...12
(time.length / 4).times do |i|
return i if month == time[i * 4] && day >= time[(i * 4) + 1]
return i if month == time[(i * 4) + 2] && day <= time[(i * 4) + 3]
end
@@ -207,7 +207,7 @@ def pbIsWeekday(wdayVariable, *arg)
timenow = pbGetTimeNow
wday = timenow.wday
ret = false
for wd in arg
arg.each do |wd|
ret = true if wd == wday
end
if wdayVariable > 0
@@ -232,7 +232,7 @@ def pbIsMonth(monVariable, *arg)
timenow = pbGetTimeNow
thismon = timenow.mon
ret = false
for wd in arg
arg.each do |wd|
ret = true if wd == thismon
end
if monVariable > 0
@@ -282,7 +282,7 @@ end
def pbIsSeason(seasonVariable, *arg)
thisseason = pbGetSeason
ret = false
for wd in arg
arg.each do |wd|
ret = true if wd == thisseason
end
if seasonVariable > 0