Aggiunge fascia oraria, prova manuale obbligatoria e cruscotto invii email.
CI / lint (push) Failing after 16m2s
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled

Le campagne rispettano orario e giorni lavorativi, richiedono una mail di test con dati inseriti a mano prima dell'invio massivo e offrono una dashboard per monitorare l'avanzamento.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-18 00:04:33 +02:00
co-authored by Cursor
parent 4ddf534a0c
commit 98dcdbbf82
33 changed files with 882 additions and 56 deletions
+39
View File
@@ -0,0 +1,39 @@
module Italy
class Holidays
FIXED = [
[1, 1],
[1, 6],
[4, 25],
[5, 1],
[6, 2],
[8, 15],
[11, 1],
[12, 8],
[12, 25],
[12, 26]
].freeze
def self.holiday?(date)
date = date.to_date
return true if FIXED.include?([date.month, date.day])
easter = easter_date(date.year)
date == easter || date == (easter + 1)
end
# Algoritmo gregoriano anonimo (Pasqua occidentale).
def self.easter_date(year)
a = year % 19
b, c = year.divmod(100)
d, e = b.divmod(4)
f = (b + 8) / 25
g = (b - f + 1) / 3
h = (19 * a + b - d - g + 15) % 30
i, k = c.divmod(4)
l = (32 + 2 * e + 2 * i - h - k) % 7
m = (a + 11 * h + 22 * l) / 451
month, day = (h + l - 7 * m + 114).divmod(31)
Date.new(year, month, day + 1)
end
end
end