I have public holidays stored in an array
$holiday["Christi Himmelfahrt"] = strtotime("+39 day",easter_date($year));
$holiday["Pfingstmontag"] = strtotime("+50 day",easter_date($year));
$holiday["Fronleichnam"] = strtotime("+60 day",easter_date($year));
and some more...
I was thinking about storing them in a table, because I want to add more countries. Is this a good idea? I was thinking to store it like this:
Schema::create('holidays', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->text('calculation');
$table->string('country',2)->default('AT');
$table->foreign('country')->references('iso_code')->on('countries');
$table->timestamps();
});
But how would I get this calculated dates? And again: is this a good idea at all?