{"id":17429,"date":"2017-09-01T20:09:56","date_gmt":"2017-09-01T20:09:56","guid":{"rendered":"http:\/\/www.lasterketak.eus\/calendar\/"},"modified":"2026-11-23T00:06:48","modified_gmt":"2026-11-22T22:06:48","slug":"calendario-de-carreras","status":"publish","type":"page","link":"https:\/\/www.lasterketak.eus\/es\/calendario-de-carreras\/","title":{"rendered":"Calendario de carreras"},"content":{"rendered":"<style>\n.calajax{max-width:1100px;margin:0 auto}\n.calajax__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}\n.calajax__title{margin:0;text-transform:capitalize;font-size:1.4rem}\n.calajax__nav{border:1px solid #ccc;background:#fff;border-radius:6px;padding:6px 14px;font-size:1.2rem;cursor:pointer}\n.calajax__nav:hover{background:#f3f3f3}\n.calajax__status{min-height:1.4em;margin-bottom:8px;color:#666}\n.calajax.is-loading .calajax__grid,.calajax.is-loading .calajax__agenda{opacity:.5}\n.calajax__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}\n.calajax__dow{text-align:center;font-weight:600;text-transform:capitalize;padding:6px 0}\n.calajax__cell{min-height:92px;border:1px solid #e3e3e3;border-radius:6px;padding:4px;overflow:hidden}\n.calajax__cell--empty{border:0}\n.calajax__cell.is-today{border-color:#d33;box-shadow:inset 0 0 0 1px #d33}\n.calajax__day{display:block;font-size:.8rem;color:#666;margin-bottom:2px}\n.calajax__event{display:block;font-size:.78rem;line-height:1.25;margin-bottom:2px;padding:2px 4px;border-radius:4px;background:#eef3ff;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n.calajax__event:hover{background:#dbe6ff}\n.calajax__event.is-multi{background:#fff1dc}\n.calajax__event.is-multi:hover{background:#ffe3bb}\n.calajax__agenda{display:none;list-style:none;margin:0;padding:0}\n.calajax__agenda li{padding:8px 0;border-bottom:1px solid #eee}\n.calajax__agenda time{display:inline-block;min-width:110px;color:#666;text-transform:capitalize}\n@media (max-width:640px){\n  .calajax__grid{display:none}\n  .calajax__agenda{display:block}\n}\n<\/style>\n\n<div id=\"calajax\" class=\"calajax\"\n     data-ajax=\"https:\/\/www.lasterketak.eus\/wp-admin\/admin-ajax.php\"\n     data-locale=\"es\"\n     data-i18n=\"{&quot;loading&quot;:&quot;Cargando...&quot;,&quot;error&quot;:&quot;No se han podido cargar los eventos.&quot;,&quot;empty&quot;:&quot;No hay eventos este mes.&quot;,&quot;prev&quot;:&quot;Mes anterior&quot;,&quot;next&quot;:&quot;Mes siguiente&quot;}\"><\/div>\n\n<script>\n(function () {\n  var root = document.getElementById('calajax');\n  if (!root) return;\n  var ajaxUrl = root.getAttribute('data-ajax');\n  var locale = root.getAttribute('data-locale') || 'es';\n  var i18n = JSON.parse(root.getAttribute('data-i18n'));\n  var now = new Date();\n  var state = { y: now.getFullYear(), m: now.getMonth() + 1 };\n  var cache = {};\n  var ctrl = null;\n\n  function el(tag, cls, text) {\n    var n = document.createElement(tag);\n    if (cls) n.className = cls;\n    if (text != null) n.textContent = text;\n    return n;\n  }\n  function pad(n) { return (n < 10 ? '0' : '') + n; }\n  \/* '2026-12-19' -> 20261219 (para comparar fechas como numeros) *\/\n  function ymd(s) { return parseInt(s.slice(0, 4) + s.slice(5, 7) + s.slice(8, 10), 10); }\n\n  var head = el('div', 'calajax__head');\n  var prev = el('button', 'calajax__nav', '\\u2039');\n  var next = el('button', 'calajax__nav', '\\u203A');\n  prev.type = next.type = 'button';\n  prev.setAttribute('aria-label', i18n.prev);\n  next.setAttribute('aria-label', i18n.next);\n  var title = el('h3', 'calajax__title');\n  title.setAttribute('aria-live', 'polite');\n  head.appendChild(prev); head.appendChild(title); head.appendChild(next);\n\n  var status = el('div', 'calajax__status');\n  var grid = el('div', 'calajax__grid');\n  var agenda = el('ul', 'calajax__agenda');\n  root.appendChild(head); root.appendChild(status);\n  root.appendChild(grid); root.appendChild(agenda);\n\n  function load(y, m) {\n    var key = y + '-' + pad(m);\n    if (cache[key]) return Promise.resolve(cache[key]);\n    if (ctrl) ctrl.abort();\n    ctrl = new AbortController();\n    var url = ajaxUrl + '?action=calajax_month&year=' + y + '&month=' + m;\n    return fetch(url, { signal: ctrl.signal, credentials: 'same-origin' })\n      .then(function (r) {\n        if (!r.ok) throw new Error('http ' + r.status);\n        return r.json();\n      })\n      .then(function (j) {\n        if (!j.success) throw new Error('bad response');\n        cache[key] = j.data.events;\n        return cache[key];\n      });\n  }\n\n  function render(events) {\n    var y = state.y, m = state.m;\n    title.textContent = new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' })\n      .format(new Date(y, m - 1, 1));\n    grid.textContent = '';\n    agenda.textContent = '';\n\n    var days = new Date(y, m, 0).getDate();\n    var base = y * 10000 + m * 100;\n\n    \/* Reparte cada evento en todos los dias del mes que ocupa *\/\n    var byDay = {};\n    events.forEach(function (e) {\n      var s = ymd(e.date), f = ymd(e.end);\n      for (var d = 1; d <= days; d++) {\n        var cur = base + d;\n        if (cur >= s && cur <= f) (byDay[d] = byDay[d] || []).push(e);\n      }\n    });\n\n    var wd = new Intl.DateTimeFormat(locale, { weekday: 'short' });\n    var i;\n    for (i = 0; i < 7; i++) {\n      grid.appendChild(el('div', 'calajax__dow', wd.format(new Date(2024, 0, 1 + i)))); \/* 1 ene 2024 = lunes *\/\n    }\n    var first = (new Date(y, m - 1, 1).getDay() + 6) % 7;\n    for (i = 0; i < first; i++) grid.appendChild(el('div', 'calajax__cell calajax__cell--empty'));\n\n    for (var d = 1; d <= days; d++) {\n      var cell = el('div', 'calajax__cell');\n      if (y === now.getFullYear() && m === now.getMonth() + 1 && d === now.getDate()) {\n        cell.classList.add('is-today');\n      }\n      cell.appendChild(el('span', 'calajax__day', d));\n      (byDay[d] || []).forEach(function (e) {\n        var a = el('a', 'calajax__event', e.title);\n        if (e.end !== e.date) a.classList.add('is-multi');\n        a.href = e.url;\n        a.title = e.title;\n        cell.appendChild(a);\n      });\n      grid.appendChild(cell);\n    }\n\n    var dfShort = new Intl.DateTimeFormat(locale, { weekday: 'short', day: 'numeric' });\n    var dfDay = new Intl.DateTimeFormat(locale, { day: 'numeric', month: 'short' });\n    events.forEach(function (e) {\n      var li = el('li');\n      var d1 = new Date(e.date + 'T00:00:00');\n      var label = e.end === e.date\n        ? dfShort.format(d1)\n        : dfDay.format(d1) + ' \\u2013 ' + dfDay.format(new Date(e.end + 'T00:00:00'));\n      var a = el('a', null, e.title);\n      a.href = e.url;\n      li.appendChild(el('time', null, label));\n      li.appendChild(a);\n      agenda.appendChild(li);\n    });\n\n    status.textContent = events.length ? '' : i18n.empty;\n  }\n\n  function go(y, m) {\n    state.y = y; state.m = m;\n    root.classList.add('is-loading');\n    status.textContent = i18n.loading;\n    load(y, m)\n      .then(function (events) {\n        if (state.y !== y || state.m !== m) return;\n        render(events);\n      })\n      .catch(function (err) {\n        if (err && err.name === 'AbortError') return;\n        status.textContent = i18n.error;\n      })\n      .then(function () {\n        if (state.y === y && state.m === m) root.classList.remove('is-loading');\n      });\n  }\n\n  prev.addEventListener('click', function () {\n    var y = state.y, m = state.m - 1;\n    if (m < 1) { m = 12; y--; }\n    go(y, m);\n  });\n  next.addEventListener('click', function () {\n    var y = state.y, m = state.m + 1;\n    if (m > 12) { m = 1; y++; }\n    go(y, m);\n  });\n\n  go(state.y, state.m);\n})();\n<\/script>\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"rs_blank_template":"","rs_page_bg_color":"","slide_template_v7":"","footnotes":""},"class_list":["post-17429","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Calendario de carreras - Lasterketak.eus<\/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:\/\/www.lasterketak.eus\/es\/calendario-de-carreras\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Calendario de carreras - Lasterketak.eus\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lasterketak.eus\/es\/calendario-de-carreras\/\" \/>\n<meta property=\"og:site_name\" content=\"Lasterketak.eus\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/lasterketak\/\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-22T22:06:48+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@lasterketak\" \/>\n<meta name=\"twitter:label1\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/calendario-de-carreras\\\/\",\"url\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/calendario-de-carreras\\\/\",\"name\":\"Calendario de carreras - Lasterketak.eus\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/#website\"},\"datePublished\":\"2017-09-01T20:09:56+00:00\",\"dateModified\":\"2026-11-22T22:06:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/calendario-de-carreras\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/calendario-de-carreras\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/calendario-de-carreras\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Calendario de carreras\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/#website\",\"url\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/\",\"name\":\"Lasterketak\",\"description\":\"Euskal Herriko lasterketak\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/#organization\"},\"alternateName\":\"Lasterketak\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/#organization\",\"name\":\"Lasterketak\",\"alternateName\":\"Lasterketak\",\"url\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"http:\\\/\\\/www.lasterketak.eus\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/logoa_L.png\",\"contentUrl\":\"http:\\\/\\\/www.lasterketak.eus\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/logoa_L.png\",\"width\":300,\"height\":300,\"caption\":\"Lasterketak\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lasterketak.eus\\\/es\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/lasterketak\\\/\",\"https:\\\/\\\/x.com\\\/lasterketak\",\"https:\\\/\\\/www.instagram.com\\\/lasterketak\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/lasterketak\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Calendario de carreras - Lasterketak.eus","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:\/\/www.lasterketak.eus\/es\/calendario-de-carreras\/","og_locale":"es_ES","og_type":"article","og_title":"Calendario de carreras - Lasterketak.eus","og_url":"https:\/\/www.lasterketak.eus\/es\/calendario-de-carreras\/","og_site_name":"Lasterketak.eus","article_publisher":"https:\/\/www.facebook.com\/lasterketak\/","article_modified_time":"2026-11-22T22:06:48+00:00","twitter_card":"summary_large_image","twitter_site":"@lasterketak","twitter_misc":{"Tiempo de lectura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.lasterketak.eus\/es\/calendario-de-carreras\/","url":"https:\/\/www.lasterketak.eus\/es\/calendario-de-carreras\/","name":"Calendario de carreras - Lasterketak.eus","isPartOf":{"@id":"https:\/\/www.lasterketak.eus\/es\/#website"},"datePublished":"2017-09-01T20:09:56+00:00","dateModified":"2026-11-22T22:06:48+00:00","breadcrumb":{"@id":"https:\/\/www.lasterketak.eus\/es\/calendario-de-carreras\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lasterketak.eus\/es\/calendario-de-carreras\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.lasterketak.eus\/es\/calendario-de-carreras\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/www.lasterketak.eus\/es\/"},{"@type":"ListItem","position":2,"name":"Calendario de carreras"}]},{"@type":"WebSite","@id":"https:\/\/www.lasterketak.eus\/es\/#website","url":"https:\/\/www.lasterketak.eus\/es\/","name":"Lasterketak","description":"Euskal Herriko lasterketak","publisher":{"@id":"https:\/\/www.lasterketak.eus\/es\/#organization"},"alternateName":"Lasterketak","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lasterketak.eus\/es\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/www.lasterketak.eus\/es\/#organization","name":"Lasterketak","alternateName":"Lasterketak","url":"https:\/\/www.lasterketak.eus\/es\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.lasterketak.eus\/es\/#\/schema\/logo\/image\/","url":"http:\/\/www.lasterketak.eus\/wp-content\/uploads\/2018\/08\/logoa_L.png","contentUrl":"http:\/\/www.lasterketak.eus\/wp-content\/uploads\/2018\/08\/logoa_L.png","width":300,"height":300,"caption":"Lasterketak"},"image":{"@id":"https:\/\/www.lasterketak.eus\/es\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/lasterketak\/","https:\/\/x.com\/lasterketak","https:\/\/www.instagram.com\/lasterketak\/","https:\/\/www.youtube.com\/user\/lasterketak"]}]}},"_links":{"self":[{"href":"https:\/\/www.lasterketak.eus\/es\/wp-json\/wp\/v2\/pages\/17429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lasterketak.eus\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.lasterketak.eus\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.lasterketak.eus\/es\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lasterketak.eus\/es\/wp-json\/wp\/v2\/comments?post=17429"}],"version-history":[{"count":2,"href":"https:\/\/www.lasterketak.eus\/es\/wp-json\/wp\/v2\/pages\/17429\/revisions"}],"predecessor-version":[{"id":53610,"href":"https:\/\/www.lasterketak.eus\/es\/wp-json\/wp\/v2\/pages\/17429\/revisions\/53610"}],"wp:attachment":[{"href":"https:\/\/www.lasterketak.eus\/es\/wp-json\/wp\/v2\/media?parent=17429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}