summaryrefslogtreecommitdiff
path: root/activity.lua
diff options
context:
space:
mode:
Diffstat (limited to 'activity.lua')
-rw-r--r--activity.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/activity.lua b/activity.lua
index 1be6e93..1d1ef8e 100644
--- a/activity.lua
+++ b/activity.lua
@@ -1,7 +1,7 @@
local activity = {}
-function activity.days (year)
+function activity.days_in (year)
if year % 4 ~= 0 or year % 100 == 0 and year % 400 ~= 0 then
return 365
end
@@ -53,7 +53,7 @@ function activity.generate_table (year)
local rows = ""
local weekdays = {"", "Mon", "", "Wed", "", "Fri", ""}
local start_from = activity.first_week_day(year)
- local end_at = (start_from + activity.days(year) - 1) % 7
+ local end_at = (start_from + activity.days_in(year) - 1) % 7
for index, weekday in pairs(weekdays) do
rows = rows .. row(weekday, index >= start_from, index <= end_at)
end