Remove example holidays

master
Wuzzy 2020-08-28 16:30:32 +02:00
parent 8b4520c1c0
commit ea07f004c0
1 changed files with 0 additions and 19 deletions

View File

@ -71,25 +71,6 @@ calendar.register_holiday = function(def)
table.insert(holidays, def)
end
-- Example holidays
calendar.register_holiday({
name = S("New Year's Eve"),
type = "monthday",
days = 0,
months = 0
})
calendar.register_holiday({
name = S("Mother's Day"),
type = "custom",
-- First Sunday in May
is_holiday = function(total_days)
local d, m, y = calendar.get_date(total_days)
local wday = calendar.get_weekday(total_days)
return wday == 6 and m == 4 and d <= 6
end,
})
calendar.get_holidays = function(total_days)
if not total_days then
total_days = minetest.get_day_count()