Remove example holidays
parent
8b4520c1c0
commit
ea07f004c0
19
init.lua
19
init.lua
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue