{"id":219,"date":"2025-06-19T04:57:31","date_gmt":"2025-06-19T02:57:31","guid":{"rendered":"https:\/\/festivos.cl\/?page_id=219"},"modified":"2025-06-19T04:57:32","modified_gmt":"2025-06-19T02:57:32","slug":"comparadora-de-feriados-entre-distintos-anos","status":"publish","type":"page","link":"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/","title":{"rendered":"Comparadora de feriados entre distintos a\u00f1os"},"content":{"rendered":"\n<!-- Comparador de Feriados Festivos.cl - Para WordPress -->\n<div id=\"festivos-comparador\" style=\"font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; max-width: 100%; margin: 20px auto; background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); border-radius: 15px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1);\">\n\n<style>\n#festivos-comparador * { box-sizing: border-box; }\n#festivos-comparador .fc-container { background: rgba(255,255,255,0.98); border-radius: 15px; padding: 25px; }\n#festivos-comparador .fc-header { text-align: center; margin-bottom: 25px; }\n#festivos-comparador .fc-header h2 { color: #1e3c72; font-size: 2.2rem; margin: 0 0 5px 0; font-weight: 800; }\n#festivos-comparador .fc-subtitle { color: #2a5298; font-size: 1.1rem; font-weight: 600; margin: 0 0 8px 0; }\n#festivos-comparador .fc-description { color: #666; font-size: 0.95rem; margin: 0; }\n\n#festivos-comparador .fc-controls { display: flex; justify-content: center; gap: 20px; margin-bottom: 25px; flex-wrap: wrap; }\n#festivos-comparador .fc-year-selector { display: flex; flex-direction: column; align-items: center; gap: 8px; }\n#festivos-comparador .fc-year-selector label { font-weight: 600; color: #2c3e50; font-size: 0.95rem; }\n#festivos-comparador .fc-year-selector select { padding: 10px 15px; border: 2px solid #e0e6ed; border-radius: 8px; font-size: 0.9rem; background: white; color: #2c3e50; cursor: pointer; transition: all 0.3s ease; min-width: 110px; }\n#festivos-comparador .fc-year-selector select:hover { border-color: #2a5298; }\n#festivos-comparador .fc-year-selector select:focus { outline: none; border-color: #2a5298; box-shadow: 0 0 0 3px rgba(42,82,152,0.1); }\n\n#festivos-comparador .fc-legend { display: flex; justify-content: center; gap: 15px; margin: 15px 0; flex-wrap: wrap; }\n#festivos-comparador .fc-legend-item { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.9); padding: 6px 10px; border-radius: 15px; font-size: 0.8rem; color: #2c3e50; }\n#festivos-comparador .fc-legend-color { width: 10px; height: 10px; border-radius: 2px; }\n#festivos-comparador .fc-legend-color.normal { background: #2a5298; }\n#festivos-comparador .fc-legend-color.long-weekend { background: #e74c3c; }\n#festivos-comparador .fc-legend-color.sandwich { background: #f39c12; }\n\n#festivos-comparador .fc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; padding: 15px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; color: white; }\n#festivos-comparador .fc-stat-item { text-align: center; padding: 12px; background: rgba(255,255,255,0.15); border-radius: 8px; border: 1px solid rgba(255,255,255,0.2); }\n#festivos-comparador .fc-stat-number { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }\n#festivos-comparador .fc-stat-label { font-size: 0.75rem; opacity: 0.95; }\n\n#festivos-comparador .fc-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }\n#festivos-comparador .fc-year-column { background: linear-gradient(145deg, #f8f9fa, #e9ecef); border-radius: 12px; padding: 15px; border: 1px solid #dee2e6; }\n#festivos-comparador .fc-year-title { text-align: center; font-size: 1.2rem; font-weight: 700; color: white; margin-bottom: 15px; padding: 12px; background: linear-gradient(135deg, #1e3c72, #2a5298); border-radius: 8px; }\n\n#festivos-comparador .fc-holiday-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; margin-bottom: 6px; background: white; border-radius: 6px; border-left: 3px solid #2a5298; box-shadow: 0 1px 6px rgba(0,0,0,0.05); transition: all 0.2s ease; position: relative; font-size: 0.85rem; }\n#festivos-comparador .fc-holiday-item:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.1); }\n#festivos-comparador .fc-holiday-item.long-weekend { border-left-color: #e74c3c; background: linear-gradient(90deg, #fff, #fdf2f2); }\n#festivos-comparador .fc-holiday-item.sandwich { border-left-color: #f39c12; background: linear-gradient(90deg, #fff, #fef9e7); }\n\n#festivos-comparador .fc-holiday-name { font-weight: 600; color: #2c3e50; flex: 1; }\n#festivos-comparador .fc-holiday-date { color: #7f8c8d; font-size: 0.75rem; background: #f8f9fa; padding: 3px 6px; border-radius: 10px; min-width: 60px; text-align: center; }\n#festivos-comparador .fc-holiday-day { color: #495057; font-size: 0.7rem; margin-left: 6px; font-style: italic; min-width: 50px; }\n\n#festivos-comparador .fc-special-badge { position: absolute; top: -3px; right: -3px; background: #e74c3c; color: white; font-size: 0.6rem; padding: 1px 4px; border-radius: 8px; font-weight: 600; }\n#festivos-comparador .fc-special-badge.sandwich { background: #f39c12; }\n\n#festivos-comparador .fc-weekend-indicator { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #e74c3c; margin-left: 4px; }\n#festivos-comparador .fc-weekday-indicator { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #27ae60; margin-left: 4px; }\n\n#festivos-comparador .fc-special-periods { margin-top: 15px; padding: 15px; background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); border-radius: 10px; color: #2c3e50; }\n#festivos-comparador .fc-special-periods h4 { margin: 0 0 12px 0; color: #2c3e50; font-size: 1rem; text-align: center; }\n#festivos-comparador .fc-period-item { background: rgba(255,255,255,0.8); padding: 8px 12px; margin: 6px 0; border-radius: 6px; font-size: 0.8rem; border-left: 3px solid #e91e63; }\n#festivos-comparador .fc-period-item.sandwich-period { border-left-color: #ff9800; }\n\n#festivos-comparador .fc-no-data { text-align: center; color: #7f8c8d; font-style: italic; padding: 30px; }\n\n@media (max-width: 768px) {\n  #festivos-comparador .fc-comparison { grid-template-columns: 1fr; }\n  #festivos-comparador .fc-controls { flex-direction: column; align-items: center; }\n  #festivos-comparador .fc-header h2 { font-size: 1.8rem; }\n  #festivos-comparador .fc-stats { grid-template-columns: repeat(2, 1fr); }\n}\n<\/style>\n\n<div class=\"fc-container\">\n  <div class=\"fc-header\">\n    <h2>\ud83c\udde8\ud83c\uddf1 Festivos.cl<\/h2>\n    <div class=\"fc-subtitle\">Comparador Inteligente de Feriados<\/div>\n    <p class=\"fc-description\">Analiza fines de semana largos, interferiados y per\u00edodos ideales para planificar<\/p>\n  <\/div>\n\n  <div class=\"fc-controls\">\n    <div class=\"fc-year-selector\">\n      <label for=\"fc-year1\">Primer A\u00f1o<\/label>\n      <select id=\"fc-year1\">\n        <option value=\"\">Seleccionar<\/option>\n      <\/select>\n    <\/div>\n    <div class=\"fc-year-selector\">\n      <label for=\"fc-year2\">Segundo A\u00f1o<\/label>\n      <select id=\"fc-year2\">\n        <option value=\"\">Seleccionar<\/option>\n      <\/select>\n    <\/div>\n  <\/div>\n\n  <div class=\"fc-legend\" id=\"fc-legend\" style=\"display: none;\">\n    <div class=\"fc-legend-item\">\n      <div class=\"fc-legend-color normal\"><\/div>\n      <span>Feriado Normal<\/span>\n    <\/div>\n    <div class=\"fc-legend-item\">\n      <div class=\"fc-legend-color long-weekend\"><\/div>\n      <span>Fin de Semana Largo<\/span>\n    <\/div>\n    <div class=\"fc-legend-item\">\n      <div class=\"fc-legend-color sandwich\"><\/div>\n      <span>Interferiado Sandwich<\/span>\n    <\/div>\n  <\/div>\n\n  <div class=\"fc-stats\" id=\"fc-stats\" style=\"display: none;\">\n    <div class=\"fc-stat-item\">\n      <div class=\"fc-stat-number\" id=\"fc-total1\">0<\/div>\n      <div class=\"fc-stat-label\">Total Feriados<\/div>\n    <\/div>\n    <div class=\"fc-stat-item\">\n      <div class=\"fc-stat-number\" id=\"fc-total2\">0<\/div>\n      <div class=\"fc-stat-label\">Total Feriados<\/div>\n    <\/div>\n    <div class=\"fc-stat-item\">\n      <div class=\"fc-stat-number\" id=\"fc-longWeekends1\">0<\/div>\n      <div class=\"fc-stat-label\">Fines Semana Largos<\/div>\n    <\/div>\n    <div class=\"fc-stat-item\">\n      <div class=\"fc-stat-number\" id=\"fc-longWeekends2\">0<\/div>\n      <div class=\"fc-stat-label\">Fines Semana Largos<\/div>\n    <\/div>\n    <div class=\"fc-stat-item\">\n      <div class=\"fc-stat-number\" id=\"fc-sandwiches1\">0<\/div>\n      <div class=\"fc-stat-label\">Interferiados<\/div>\n    <\/div>\n    <div class=\"fc-stat-item\">\n      <div class=\"fc-stat-number\" id=\"fc-sandwiches2\">0<\/div>\n      <div class=\"fc-stat-label\">Interferiados<\/div>\n    <\/div>\n  <\/div>\n\n  <div class=\"fc-comparison\" id=\"fc-comparison\" style=\"display: none;\">\n    <div class=\"fc-year-column\">\n      <div class=\"fc-year-title\" id=\"fc-title1\">A\u00f1o 1<\/div>\n      <div id=\"fc-holidays1\"><\/div>\n      <div class=\"fc-special-periods\" id=\"fc-special1\"><\/div>\n    <\/div>\n    <div class=\"fc-year-column\">\n      <div class=\"fc-year-title\" id=\"fc-title2\">A\u00f1o 2<\/div>\n      <div id=\"fc-holidays2\"><\/div>\n      <div class=\"fc-special-periods\" id=\"fc-special2\"><\/div>\n    <\/div>\n  <\/div>\n\n  <div class=\"fc-no-data\" id=\"fc-noData\">\n    Selecciona dos a\u00f1os para comenzar el an\u00e1lisis de feriados y per\u00edodos especiales\n  <\/div>\n<\/div>\n\n<script>\n(function() {\n  const fcHolidays = {\n    2023: [\n      { name: \"A\u00f1o Nuevo\", date: \"2023-01-01\" },\n      { name: \"Viernes Santo\", date: \"2023-04-07\" },\n      { name: \"S\u00e1bado Santo\", date: \"2023-04-08\" },\n      { name: \"D\u00eda del Trabajador\", date: \"2023-05-01\" },\n      { name: \"D\u00eda de las Glorias Navales\", date: \"2023-05-21\" },\n      { name: \"San Pedro y San Pablo\", date: \"2023-06-26\" },\n      { name: \"D\u00eda de la Virgen del Carmen\", date: \"2023-07-16\" },\n      { name: \"Asunci\u00f3n de la Virgen\", date: \"2023-08-15\" },\n      { name: \"Independencia Nacional\", date: \"2023-09-18\" },\n      { name: \"Glorias del Ej\u00e9rcito\", date: \"2023-09-19\" },\n      { name: \"Encuentro de Dos Mundos\", date: \"2023-10-09\" },\n      { name: \"D\u00eda de las Iglesias Evang\u00e9licas\", date: \"2023-10-31\" },\n      { name: \"D\u00eda de Todos los Santos\", date: \"2023-11-01\" },\n      { name: \"Inmaculada Concepci\u00f3n\", date: \"2023-12-08\" },\n      { name: \"Navidad\", date: \"2023-12-25\" }\n    ],\n    2024: [\n      { name: \"A\u00f1o Nuevo\", date: \"2024-01-01\" },\n      { name: \"Viernes Santo\", date: \"2024-03-29\" },\n      { name: \"S\u00e1bado Santo\", date: \"2024-03-30\" },\n      { name: \"D\u00eda del Trabajador\", date: \"2024-05-01\" },\n      { name: \"D\u00eda de las Glorias Navales\", date: \"2024-05-21\" },\n      { name: \"San Pedro y San Pablo\", date: \"2024-06-29\" },\n      { name: \"D\u00eda de la Virgen del Carmen\", date: \"2024-07-16\" },\n      { name: \"Asunci\u00f3n de la Virgen\", date: \"2024-08-15\" },\n      { name: \"Independencia Nacional\", date: \"2024-09-18\" },\n      { name: \"Glorias del Ej\u00e9rcito\", date: \"2024-09-19\" },\n      { name: \"Encuentro de Dos Mundos\", date: \"2024-10-12\" },\n      { name: \"D\u00eda de las Iglesias Evang\u00e9licas\", date: \"2024-10-31\" },\n      { name: \"D\u00eda de Todos los Santos\", date: \"2024-11-01\" },\n      { name: \"Inmaculada Concepci\u00f3n\", date: \"2024-12-08\" },\n      { name: \"Navidad\", date: \"2024-12-25\" }\n    ],\n    2025: [\n      { name: \"A\u00f1o Nuevo\", date: \"2025-01-01\" },\n      { name: \"Viernes Santo\", date: \"2025-04-18\" },\n      { name: \"S\u00e1bado Santo\", date: \"2025-04-19\" },\n      { name: \"D\u00eda del Trabajador\", date: \"2025-05-01\" },\n      { name: \"D\u00eda de las Glorias Navales\", date: \"2025-05-21\" },\n      { name: \"San Pedro y San Pablo\", date: \"2025-06-29\" },\n      { name: \"D\u00eda de la Virgen del Carmen\", date: \"2025-07-16\" },\n      { name: \"Asunci\u00f3n de la Virgen\", date: \"2025-08-15\" },\n      { name: \"Independencia Nacional\", date: \"2025-09-18\" },\n      { name: \"Glorias del Ej\u00e9rcito\", date: \"2025-09-19\" },\n      { name: \"Encuentro de Dos Mundos\", date: \"2025-10-12\" },\n      { name: \"D\u00eda de las Iglesias Evang\u00e9licas\", date: \"2025-10-31\" },\n      { name: \"D\u00eda de Todos los Santos\", date: \"2025-11-01\" },\n      { name: \"Inmaculada Concepci\u00f3n\", date: \"2025-12-08\" },\n      { name: \"Navidad\", date: \"2025-12-25\" }\n    ],\n    2026: [\n      { name: \"A\u00f1o Nuevo\", date: \"2026-01-01\" },\n      { name: \"Viernes Santo\", date: \"2026-04-03\" },\n      { name: \"S\u00e1bado Santo\", date: \"2026-04-04\" },\n      { name: \"D\u00eda del Trabajador\", date: \"2026-05-01\" },\n      { name: \"D\u00eda de las Glorias Navales\", date: \"2026-05-21\" },\n      { name: \"San Pedro y San Pablo\", date: \"2026-06-29\" },\n      { name: \"D\u00eda de la Virgen del Carmen\", date: \"2026-07-16\" },\n      { name: \"Asunci\u00f3n de la Virgen\", date: \"2026-08-15\" },\n      { name: \"Independencia Nacional\", date: \"2026-09-18\" },\n      { name: \"Glorias del Ej\u00e9rcito\", date: \"2026-09-19\" },\n      { name: \"Encuentro de Dos Mundos\", date: \"2026-10-12\" },\n      { name: \"D\u00eda de las Iglesias Evang\u00e9licas\", date: \"2026-10-31\" },\n      { name: \"D\u00eda de Todos los Santos\", date: \"2026-11-01\" },\n      { name: \"Inmaculada Concepci\u00f3n\", date: \"2026-12-08\" },\n      { name: \"Navidad\", date: \"2026-12-25\" }\n    ]\n  };\n\n  function fcGetDayName(date) {\n    const days = ['Domingo', 'Lunes', 'Martes', 'Mi\u00e9rcoles', 'Jueves', 'Viernes', 'S\u00e1bado'];\n    return days[date.getDay()];\n  }\n\n  function fcFormatDate(dateStr) {\n    const date = new Date(dateStr + 'T00:00:00');\n    const months = ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'];\n    return `${date.getDate()} ${months[date.getMonth()]}`;\n  }\n\n  function fcIsWeekend(dateStr) {\n    const date = new Date(dateStr + 'T00:00:00');\n    return date.getDay() === 0 || date.getDay() === 6;\n  }\n\n  function fcIsLongWeekend(dateStr) {\n    const date = new Date(dateStr + 'T00:00:00');\n    const dayOfWeek = date.getDay();\n    return dayOfWeek === 1 || dayOfWeek === 5;\n  }\n\n  function fcDetectSandwiches(yearHolidays) {\n    const sandwiches = [];\n    const sortedHolidays = [...yearHolidays].sort((a, b) => new Date(a.date) - new Date(b.date));\n    \n    sortedHolidays.forEach((holiday, index) => {\n      const date = new Date(holiday.date + 'T00:00:00');\n      const dayOfWeek = date.getDay();\n      \n      if (dayOfWeek === 2 || dayOfWeek === 3) {\n        sandwiches.push({\n          type: 'Sandwich con fin de semana',\n          holiday: holiday.name,\n          date: holiday.date,\n          description: `${holiday.name} cae ${fcGetDayName(date)}, ideal para puente con fin de semana anterior`\n        });\n      }\n      \n      if (dayOfWeek === 4) {\n        sandwiches.push({\n          type: 'Sandwich con fin de semana',\n          holiday: holiday.name,\n          date: holiday.date,\n          description: `${holiday.name} cae ${fcGetDayName(date)}, ideal para puente hasta fin de semana`\n        });\n      }\n      \n      if (index < sortedHolidays.length - 1) {\n        const nextHoliday = sortedHolidays[index + 1];\n        const nextDate = new Date(nextHoliday.date + 'T00:00:00');\n        const daysDiff = (nextDate - date) \/ (1000 * 60 * 60 * 24);\n        \n        if (daysDiff > 1 && daysDiff <= 4) {\n          sandwiches.push({\n            type: 'Sandwich entre feriados',\n            holiday: `${holiday.name} - ${nextHoliday.name}`,\n            date: holiday.date,\n            description: `${Math.floor(daysDiff - 1)} d\u00eda(s) entre ${holiday.name} y ${nextHoliday.name}`\n          });\n        }\n      }\n    });\n    \n    return sandwiches;\n  }\n\n  function fcGetSpecialPeriods(yearHolidays) {\n    const longWeekends = yearHolidays.filter(h => fcIsLongWeekend(h.date));\n    const sandwiches = fcDetectSandwiches(yearHolidays);\n    return { longWeekends, sandwiches };\n  }\n\n  function fcDisplaySpecialPeriods(year, containerId) {\n    const container = document.getElementById(containerId);\n    const yearHolidays = fcHolidays[year] || [];\n    const { longWeekends, sandwiches } = fcGetSpecialPeriods(yearHolidays);\n    \n    let html = '<h4>\ud83c\udfaf Per\u00edodos Especiales<\/h4>';\n    \n    if (longWeekends.length > 0) {\n      html += '<div style=\"margin: 8px 0; font-weight: 600; color: #e74c3c; font-size: 0.85rem;\">\ud83d\udcc5 Fines de Semana Largos:<\/div>';\n      longWeekends.forEach(holiday => {\n        const date = new Date(holiday.date + 'T00:00:00');\n        html += `<div class=\"fc-period-item\">\n          <strong>${holiday.name}<\/strong> - ${fcGetDayName(date)} ${fcFormatDate(holiday.date)}\n          <div style=\"font-size: 0.7rem; color: #666; margin-top: 2px;\">Fin de semana de 3 d\u00edas<\/div>\n        <\/div>`;\n      });\n    }\n    \n    if (sandwiches.length > 0) {\n      html += '<div style=\"margin: 12px 0 8px 0; font-weight: 600; color: #f39c12; font-size: 0.85rem;\">\ud83e\udd6a Interferiados Sandwich:<\/div>';\n      sandwiches.forEach(sandwich => {\n        html += `<div class=\"fc-period-item sandwich-period\">\n          <strong>${sandwich.holiday}<\/strong>\n          <div style=\"font-size: 0.7rem; color: #666; margin-top: 2px;\">${sandwich.description}<\/div>\n        <\/div>`;\n      });\n    }\n    \n    if (longWeekends.length === 0 && sandwiches.length === 0) {\n      html += '<div class=\"fc-period-item\">No hay per\u00edodos especiales detectados<\/div>';\n    }\n    \n    container.innerHTML = html;\n  }\n\n  function fcDisplayHolidays(year, containerId) {\n    const container = document.getElementById(containerId);\n    const yearHolidays = fcHolidays[year] || [];\n    const { sandwiches } = fcGetSpecialPeriods(yearHolidays);\n    \n    if (yearHolidays.length === 0) {\n      container.innerHTML = '<div class=\"fc-no-data\">No hay datos para este a\u00f1o<\/div>';\n      return;\n    }\n\n    const sandwichDates = new Set(sandwiches.map(s => s.date));\n\n    const holidayElements = yearHolidays.map(holiday => {\n      const date = new Date(holiday.date + 'T00:00:00');\n      const dayName = fcGetDayName(date);\n      const formattedDate = fcFormatDate(holiday.date);\n      const weekendClass = fcIsWeekend(holiday.date) ? 'fc-weekend-indicator' : 'fc-weekday-indicator';\n      \n      let itemClass = 'fc-holiday-item';\n      let badge = '';\n      \n      if (fcIsLongWeekend(holiday.date)) {\n        itemClass += ' long-weekend';\n        badge = '<div class=\"fc-special-badge\">F.S.L<\/div>';\n      }\n      \n      if (sandwichDates.has(holiday.date)) {\n        itemClass += ' sandwich';\n        badge = '<div class=\"fc-special-badge sandwich\">SAND<\/div>';\n      }\n      \n      return `\n        <div class=\"${itemClass}\">\n          ${badge}\n          <div class=\"fc-holiday-name\">${holiday.name}<\/div>\n          <div style=\"display: flex; align-items: center;\">\n            <div class=\"fc-holiday-date\">${formattedDate}<\/div>\n            <div class=\"fc-holiday-day\">${dayName}<\/div>\n            <div class=\"${weekendClass}\" title=\"${fcIsWeekend(holiday.date) ? 'Fin de semana' : 'D\u00eda de semana'}\"><\/div>\n          <\/div>\n        <\/div>\n      `;\n    }).join('');\n\n    container.innerHTML = holidayElements;\n  }\n\n  function fcUpdateStats(year1, year2) {\n    const holidays1 = fcHolidays[year1] || [];\n    const holidays2 = fcHolidays[year2] || [];\n    \n    const special1 = fcGetSpecialPeriods(holidays1);\n    const special2 = fcGetSpecialPeriods(holidays2);\n    \n    document.getElementById('fc-total1').textContent = holidays1.length;\n    document.getElementById('fc-total2').textContent = holidays2.length;\n    document.getElementById('fc-longWeekends1').textContent = special1.longWeekends.length;\n    document.getElementById('fc-longWeekends2').textContent = special2.longWeekends.length;\n    document.getElementById('fc-sandwiches1').textContent = special1.sandwiches.length;\n    document.getElementById('fc-sandwiches2').textContent = special2.sandwiches.length;\n  }\n\n  function fcPopulateYearSelectors() {\n    const years = Object.keys(fcHolidays).sort();\n    const year1Select = document.getElementById('fc-year1');\n    const year2Select = document.getElementById('fc-year2');\n    \n    years.forEach(year => {\n      const option1 = new Option(year, year);\n      const option2 = new Option(year, year);\n      year1Select.add(option1);\n      year2Select.add(option2);\n    });\n  }\n\n  function fcCompareYears() {\n    const year1 = document.getElementById('fc-year1').value;\n    const year2 = document.getElementById('fc-year2').value;\n    \n    if (!year1 || !year2) {\n      document.getElementById('fc-comparison').style.display = 'none';\n      document.getElementById('fc-stats').style.display = 'none';\n      document.getElementById('fc-legend').style.display = 'none';\n      document.getElementById('fc-noData').style.display = 'block';\n      return;\n    }\n\n    document.getElementById('fc-title1').textContent = `Feriados ${year1}`;\n    document.getElementById('fc-title2').textContent = `Feriados ${year2}`;\n    \n    fcDisplayHolidays(year1, 'fc-holidays1');\n    fcDisplayHolidays(year2, 'fc-holidays2');\n    fcDisplaySpecialPeriods(year1, 'fc-special1');\n    fcDisplaySpecialPeriods(year2, 'fc-special2');\n    fcUpdateStats(year1, year2);\n    \n    document.getElementById('fc-comparison').style.display = 'grid';\n    document.getElementById('fc-stats').style.display = 'grid';\n    document.getElementById('fc-legend').style.display = 'flex';\n    document.getElementById('fc-noData').style.display = 'none';\n  }\n\n  \/\/ Inicializar cuando el DOM est\u00e9 listo\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', init);\n  } else {\n    init();\n  }\n\n  function init() {\n    fcPopulateYearSelectors();\n    \n    document.getElementById('fc-year1').addEventListener('change', fcCompareYears);\n    document.getElementById('fc-year2').addEventListener('change', fcCompareYears);\n    \n    \/\/ Establecer a\u00f1os por defecto\n    document.getElementById('fc-year1').value = '2024';\n    document.getElementById('fc-year2').value = '2025';\n    fcCompareYears();\n  }\n})();\n<\/script>\n\n<\/div>\n<!-- Fin Comparador Festivos.cl -->\n","protected":false},"excerpt":{"rendered":"<p>\ud83c\udde8\ud83c\uddf1 Festivos.cl Comparador Inteligente de Feriados Analiza fines de semana largos, interferiados y per\u00edodos ideales para planificar Primer A\u00f1o Seleccionar Segundo A\u00f1o Seleccionar Feriado Normal Fin de Semana Largo Interferiado Sandwich 0 Total Feriados 0 Total Feriados 0 Fines Semana Largos 0 Fines Semana Largos 0 Interferiados 0 Interferiados A\u00f1o 1 A\u00f1o 2 Selecciona dos [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-219","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Comparadora de feriados entre distintos a\u00f1os -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Comparadora de feriados entre distintos a\u00f1os -\" \/>\n<meta property=\"og:description\" content=\"\ud83c\udde8\ud83c\uddf1 Festivos.cl Comparador Inteligente de Feriados Analiza fines de semana largos, interferiados y per\u00edodos ideales para planificar Primer A\u00f1o Seleccionar Segundo A\u00f1o Seleccionar Feriado Normal Fin de Semana Largo Interferiado Sandwich 0 Total Feriados 0 Total Feriados 0 Fines Semana Largos 0 Fines Semana Largos 0 Interferiados 0 Interferiados A\u00f1o 1 A\u00f1o 2 Selecciona dos [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-19T02:57:32+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/\",\"url\":\"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/\",\"name\":\"Comparadora de feriados entre distintos a\u00f1os -\",\"isPartOf\":{\"@id\":\"https:\/\/festivos.cl\/#website\"},\"datePublished\":\"2025-06-19T02:57:31+00:00\",\"dateModified\":\"2025-06-19T02:57:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\/\/festivos.cl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Comparadora de feriados entre distintos a\u00f1os\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/festivos.cl\/#website\",\"url\":\"https:\/\/festivos.cl\/\",\"name\":\"Feriados y festivos en Chile\",\"description\":\"Todos los feriados de Chile en sitio interactivo\",\"publisher\":{\"@id\":\"https:\/\/festivos.cl\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/festivos.cl\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/festivos.cl\/#organization\",\"name\":\"Festivos.cl\",\"url\":\"https:\/\/festivos.cl\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/festivos.cl\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/festivos.cl\/wp-content\/uploads\/2025\/05\/ChatGPT-Image-18-may-2025-09_16_40-p.m.png\",\"contentUrl\":\"https:\/\/festivos.cl\/wp-content\/uploads\/2025\/05\/ChatGPT-Image-18-may-2025-09_16_40-p.m.png\",\"width\":1024,\"height\":1024,\"caption\":\"Festivos.cl\"},\"image\":{\"@id\":\"https:\/\/festivos.cl\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/instagram.com\/festivosdechile\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Comparadora de feriados entre distintos a\u00f1os -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/","og_locale":"en_US","og_type":"article","og_title":"Comparadora de feriados entre distintos a\u00f1os -","og_description":"\ud83c\udde8\ud83c\uddf1 Festivos.cl Comparador Inteligente de Feriados Analiza fines de semana largos, interferiados y per\u00edodos ideales para planificar Primer A\u00f1o Seleccionar Segundo A\u00f1o Seleccionar Feriado Normal Fin de Semana Largo Interferiado Sandwich 0 Total Feriados 0 Total Feriados 0 Fines Semana Largos 0 Fines Semana Largos 0 Interferiados 0 Interferiados A\u00f1o 1 A\u00f1o 2 Selecciona dos [&hellip;]","og_url":"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/","article_modified_time":"2025-06-19T02:57:32+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/","url":"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/","name":"Comparadora de feriados entre distintos a\u00f1os -","isPartOf":{"@id":"https:\/\/festivos.cl\/#website"},"datePublished":"2025-06-19T02:57:31+00:00","dateModified":"2025-06-19T02:57:32+00:00","breadcrumb":{"@id":"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/festivos.cl\/index.php\/comparadora-de-feriados-entre-distintos-anos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/festivos.cl\/"},{"@type":"ListItem","position":2,"name":"Comparadora de feriados entre distintos a\u00f1os"}]},{"@type":"WebSite","@id":"https:\/\/festivos.cl\/#website","url":"https:\/\/festivos.cl\/","name":"Feriados y festivos en Chile","description":"Todos los feriados de Chile en sitio interactivo","publisher":{"@id":"https:\/\/festivos.cl\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/festivos.cl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/festivos.cl\/#organization","name":"Festivos.cl","url":"https:\/\/festivos.cl\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/festivos.cl\/#\/schema\/logo\/image\/","url":"https:\/\/festivos.cl\/wp-content\/uploads\/2025\/05\/ChatGPT-Image-18-may-2025-09_16_40-p.m.png","contentUrl":"https:\/\/festivos.cl\/wp-content\/uploads\/2025\/05\/ChatGPT-Image-18-may-2025-09_16_40-p.m.png","width":1024,"height":1024,"caption":"Festivos.cl"},"image":{"@id":"https:\/\/festivos.cl\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/instagram.com\/festivosdechile"]}]}},"_hostinger_reach_plugin_has_subscription_block":false,"_hostinger_reach_plugin_is_elementor":false,"_links":{"self":[{"href":"https:\/\/festivos.cl\/index.php\/wp-json\/wp\/v2\/pages\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/festivos.cl\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/festivos.cl\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/festivos.cl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/festivos.cl\/index.php\/wp-json\/wp\/v2\/comments?post=219"}],"version-history":[{"count":1,"href":"https:\/\/festivos.cl\/index.php\/wp-json\/wp\/v2\/pages\/219\/revisions"}],"predecessor-version":[{"id":220,"href":"https:\/\/festivos.cl\/index.php\/wp-json\/wp\/v2\/pages\/219\/revisions\/220"}],"wp:attachment":[{"href":"https:\/\/festivos.cl\/index.php\/wp-json\/wp\/v2\/media?parent=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}