{"id":5361,"date":"2026-03-11T14:22:05","date_gmt":"2026-03-11T14:22:05","guid":{"rendered":"https:\/\/rochester-hotel.com\/newsite\/?page_id=5361"},"modified":"2026-04-10T13:21:35","modified_gmt":"2026-04-10T16:21:35","slug":"book-room","status":"publish","type":"page","link":"https:\/\/rochester-hotel.com\/newsite\/en\/book-room\/","title":{"rendered":"Booking room"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"5361\" class=\"elementor elementor-5361\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0740b9a e-flex e-con-boxed e-con e-parent\" data-id=\"0740b9a\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ead6af1 elementor-widget elementor-widget-html\" data-id=\"ead6af1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<div id=\"booking-redirect-message\" style=\"padding:24px;font-family:Arial,sans-serif;\">\r\n  Redirecting to booking...\r\n<\/div>\r\n\r\n<script>\r\n(function () {\r\n  const params = new URLSearchParams(window.location.search);\r\n  const hotel = params.get('hotel');\r\n  const roomId = params.get('room_id');\r\n\r\n  const hotelPaths = {\r\n    eik: '\/reserva-bariloche\/',\r\n    kalfka: '\/reserva-calafate\/',\r\n    classic: '\/reserva-classic\/',\r\n    concept: '\/reserva-concept\/',\r\n    serena: '\/reserva-serena\/'\r\n  };\r\n\r\n  \/\/ Safer than \"tomorrow\" because it reduces last-minute no-availability cases\r\n  const daysAhead = 7;\r\n  const nights = 1;\r\n\r\n  function formatDate(date) {\r\n    const y = date.getFullYear();\r\n    const m = String(date.getMonth() + 1).padStart(2, '0');\r\n    const d = String(date.getDate()).padStart(2, '0');\r\n    return `${y}-${m}-${d}`;\r\n  }\r\n\r\n  if (!hotel || !roomId || !hotelPaths[hotel]) {\r\n    document.getElementById('booking-redirect-message').innerHTML =\r\n      'Missing or invalid hotel \/ room_id in the URL.';\r\n    return;\r\n  }\r\n\r\n  \/\/ Detect staging vs live automatically\r\n  const isStaging = window.location.pathname.startsWith('\/newsite\/');\r\n  const basePrefix = isStaging ? '\/newsite' : '';\r\n\r\n  const baseDate = new Date();\r\n  baseDate.setHours(12, 0, 0, 0); \/\/ avoids timezone weirdness\r\n\r\n  const checkinDate = new Date(baseDate);\r\n  checkinDate.setDate(checkinDate.getDate() + daysAhead);\r\n\r\n  const checkoutDate = new Date(checkinDate);\r\n  checkoutDate.setDate(checkoutDate.getDate() + nights);\r\n\r\n  const targetUrl =\r\n    window.location.origin +\r\n    basePrefix +\r\n    hotelPaths[hotel] +\r\n    '?room_id=' + encodeURIComponent(roomId) +\r\n    '&checkin=' + formatDate(checkinDate) +\r\n    '&checkout=' + formatDate(checkoutDate);\r\n\r\n  window.location.replace(targetUrl);\r\n})();\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Redirecting to booking&#8230;<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_canvas","meta":{"footnotes":""},"class_list":["post-5361","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/rochester-hotel.com\/newsite\/en\/wp-json\/wp\/v2\/pages\/5361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rochester-hotel.com\/newsite\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/rochester-hotel.com\/newsite\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/rochester-hotel.com\/newsite\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rochester-hotel.com\/newsite\/en\/wp-json\/wp\/v2\/comments?post=5361"}],"version-history":[{"count":26,"href":"https:\/\/rochester-hotel.com\/newsite\/en\/wp-json\/wp\/v2\/pages\/5361\/revisions"}],"predecessor-version":[{"id":5763,"href":"https:\/\/rochester-hotel.com\/newsite\/en\/wp-json\/wp\/v2\/pages\/5361\/revisions\/5763"}],"wp:attachment":[{"href":"https:\/\/rochester-hotel.com\/newsite\/en\/wp-json\/wp\/v2\/media?parent=5361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}