mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 00:08:50 +01:00
More code climate style fixes
This commit is contained in:
parent
d8acf60049
commit
67a426a2e9
28 changed files with 157 additions and 172 deletions
|
|
@ -41,7 +41,7 @@ module RecurringTodos
|
|||
|
||||
# we did not find anything this week, so check the nth next, starting from
|
||||
# sunday
|
||||
start = start + self.every_x_week.week - (start.wday()).days
|
||||
start = start + self.every_x_week.week - (start.wday).days
|
||||
|
||||
start = find_first_day_in_this_week(start)
|
||||
return start unless start == -1
|
||||
|
|
@ -56,7 +56,7 @@ module RecurringTodos
|
|||
return self.start_from || Time.zone.now
|
||||
else
|
||||
start = previous + 1.day
|
||||
if start.wday() == 0
|
||||
if start.wday == 0
|
||||
# we went to a new week, go to the nth next week and find first match
|
||||
# that week. Note that we already went into the next week, so -1
|
||||
start += (every_x_week - 1).week
|
||||
|
|
@ -72,8 +72,8 @@ module RecurringTodos
|
|||
|
||||
def find_first_day_in_this_week(start)
|
||||
# check if there are any days left this week for the next todo
|
||||
start.wday().upto 6 do |i|
|
||||
return start + (i - start.wday()).days if on_xday(i)
|
||||
start.wday.upto 6 do |i|
|
||||
return start + (i - start.wday).days if on_xday(i)
|
||||
end
|
||||
-1
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue