{"id":22289,"date":"2026-02-05T13:40:33","date_gmt":"2026-02-05T06:40:33","guid":{"rendered":"https:\/\/library.udru.ac.th\/?page_id=22289"},"modified":"2026-02-05T13:45:45","modified_gmt":"2026-02-05T06:45:45","slug":"opening_time","status":"publish","type":"page","link":"https:\/\/library.udru.ac.th\/?page_id=22289","title":{"rendered":"\u0e40\u0e27\u0e25\u0e32\u0e17\u0e33\u0e01\u0e32\u0e23"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"22289\" class=\"elementor elementor-22289\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7521814b elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"7521814b\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-54ae3de7\" data-id=\"54ae3de7\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-129011ea elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"129011ea\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-310826d2\" data-id=\"310826d2\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-51c7782b elementor-widget__width-auto elementor-absolute elementor-hidden-tablet elementor-hidden-mobile elementor-invisible elementor-widget elementor-widget-edublink-animation\" data-id=\"51c7782b\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_position&quot;:&quot;absolute&quot;,&quot;_animation&quot;:&quot;fadeIn&quot;,&quot;_animation_delay&quot;:500}\" data-widget_type=\"edublink-animation.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"edublink-animation-widget edublink-animation-display-type-parallax edublink-animation-content-type-image edublink-parallax-item\" data-parallax=\"{&quot;x&quot;: 0, &quot;y&quot;: 100, &quot;rotateX&quot;: 0, &quot;rotateY&quot;: 0, &quot;rotateZ&quot;: 0, &quot;scale&quot;: 1}\"><img decoding=\"async\" src=\"https:\/\/library.udru.ac.th\/wp-content\/uploads\/2023\/05\/shape-12-1.png\" alt=\"Hero Shape 6\"><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-355f5a50 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"355f5a50\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-extended\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-771b363c\" data-id=\"771b363c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-58c48ef0 elementor-widget__width-auto elementor-absolute elementor-hidden-tablet elementor-hidden-mobile elementor-widget elementor-widget-edublink-animation\" data-id=\"58c48ef0\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_position&quot;:&quot;absolute&quot;}\" data-widget_type=\"edublink-animation.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"edublink-animation-widget edublink-animation-display-type-mouse-track edublink-animation-content-type-color edublink-mouse-track-item\"><span data-depth=\"0.8\"><span class=\"edublink-animation-widget-color\"><\/span><\/span><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e109b0a elementor-widget__width-auto elementor-absolute elementor-hidden-tablet elementor-hidden-mobile elementor-invisible elementor-widget elementor-widget-edublink-animation\" data-id=\"e109b0a\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_position&quot;:&quot;absolute&quot;,&quot;_animation&quot;:&quot;fadeIn&quot;,&quot;_animation_delay&quot;:500}\" data-widget_type=\"edublink-animation.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"edublink-animation-widget edublink-animation-display-type-mouse-track edublink-animation-content-type-image edublink-mouse-track-item\"><span data-depth=\"-2\"><img decoding=\"async\" src=\"https:\/\/library.udru.ac.th\/wp-content\/uploads\/2023\/05\/shape-13.png\" alt=\"Hero-Shape-1\"><\/span><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-382ea06b edublink-br-tp-none elementor-widget elementor-widget-edublink-heading\" data-id=\"382ea06b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"edublink-heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"edublink-section-heading\"><h3 class=\"heading\">\u0e40\u0e27\u0e25\u0e32\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23 <br>\n<mark>\u0e2b\u0e49\u0e2d\u0e07\u0e2a\u0e21\u0e38\u0e14<\/mark> \u0e17\u0e31\u0e49\u0e07 2 \u0e28\u0e39\u0e19\u0e22\u0e4c<\/h3><div class=\"title-shape\"><i class=\"icon-19\"><\/i><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-7a252bd5\" data-id=\"7a252bd5\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a2086e9 elementor-widget__width-auto elementor-absolute elementor-hidden-mobile elementor-widget elementor-widget-edublink-animation\" data-id=\"a2086e9\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_position&quot;:&quot;absolute&quot;}\" data-widget_type=\"edublink-animation.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"edublink-animation-widget edublink-animation-display-type-mouse-track edublink-animation-content-type-color edublink-mouse-track-item\"><span data-depth=\"\"><span class=\"edublink-animation-widget-color\"><\/span><\/span><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6e81ddd3 elementor-widget elementor-widget-text-editor\" data-id=\"6e81ddd3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e40\u0e27\u0e25\u0e32\u0e17\u0e33\u0e01\u0e32\u0e23\u0e02\u0e2d\u0e07\u0e28\u0e39\u0e19\u0e22\u0e4c\u0e2d\u0e38\u0e14\u0e23\u0e41\u0e25\u0e30\u0e28\u0e39\u0e19\u0e22\u0e4c\u0e2a\u0e32\u0e21\u0e1e\u0e23\u0e49\u0e32\u0e27 \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e07\u0e41\u0e1c\u0e19\u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e43\u0e0a\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23\u0e44\u0e14\u0e49\u0e2a\u0e30\u0e14\u0e27\u0e01\u0e41\u0e25\u0e30\u0e23\u0e27\u0e14\u0e40\u0e23\u0e47\u0e27<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t<div class=\"elementor-element elementor-element-a9dff32 e-flex e-con-boxed e-con e-parent\" data-id=\"a9dff32\" 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-9163c87 elementor-widget elementor-widget-html\" data-id=\"9163c87\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<style>\r\n  \/* ===== Opening Hours (auto status) ===== *\/\r\n  .hours-wrap{margin-top:16px}\r\n  .hours-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}\r\n  .hours-title h2{margin:0;font-size:18px;font-weight:900}\r\n  .hours-badge{\r\n    display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;\r\n    font-size:12px;font-weight:800;color:#7a2f00;background:rgba(251,146,60,.18);\r\n    border:1px solid rgba(249,115,22,.25)\r\n  }\r\n  .hours-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}\r\n  @media(max-width:900px){ .hours-grid{grid-template-columns:1fr} }\r\n\r\n  .hours-card{\r\n    border:1px solid rgba(0,0,0,.08);\r\n    background:linear-gradient(180deg,#fff,#fbfbfb);\r\n    border-radius:18px;box-shadow:0 2px 10px rgba(0,0,0,.06);\r\n    overflow:hidden\r\n  }\r\n  .hours-head{\r\n    display:flex;align-items:center;justify-content:space-between;gap:10px;\r\n    padding:12px 14px;\r\n    background:linear-gradient(135deg, rgba(249,115,22,.16), rgba(251,146,60,.10));\r\n    border-bottom:1px solid rgba(0,0,0,.06)\r\n  }\r\n  .hours-head .name{display:flex;align-items:center;gap:10px;margin:0;font-size:15px;font-weight:900}\r\n  .hours-icon{\r\n    width:34px;height:34px;border-radius:12px;\r\n    background:linear-gradient(135deg,#f97316,#fb923c);\r\n    display:grid;place-items:center;color:#fff;font-weight:900;\r\n    box-shadow:0 10px 18px rgba(249,115,22,.18);flex:0 0 auto\r\n  }\r\n\r\n  .hours-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}\r\n  .hours-now{\r\n    font-size:12px;font-weight:800;color:#7a2f00;\r\n    padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.75);\r\n    border:1px solid rgba(249,115,22,.18);white-space:nowrap\r\n  }\r\n  .hours-status{\r\n    display:inline-flex;align-items:center;gap:8px;\r\n    padding:6px 10px;border-radius:999px;font-size:12.5px;font-weight:900;\r\n    border:1px solid rgba(0,0,0,.08);background:rgba(255,255,255,.85);white-space:nowrap\r\n  }\r\n  .hours-status .s-dot{width:9px;height:9px;border-radius:50%;background:linear-gradient(135deg,#f97316,#fb923c);box-shadow:0 0 0 4px rgba(249,115,22,.12)}\r\n  .is-open{color:#065f46;border-color:rgba(16,185,129,.25);background:rgba(16,185,129,.10)}\r\n  .is-open .s-dot{background:radial-gradient(circle at 30% 30%,#fff,rgba(16,185,129,.95) 45%,rgba(5,150,105,1) 80%);box-shadow:0 0 0 4px rgba(16,185,129,.14)}\r\n  .is-closed{color:#7c2d12;border-color:rgba(249,115,22,.25);background:rgba(249,115,22,.10)}\r\n  .is-closed .s-dot{background:radial-gradient(circle at 30% 30%,#fff,rgba(249,115,22,.95) 45%,rgba(194,65,12,1) 80%);box-shadow:0 0 0 4px rgba(249,115,22,.14)}\r\n  .is-holiday{color:#7f1d1d;border-color:rgba(220,38,38,.25);background:rgba(220,38,38,.10)}\r\n  .is-holiday .s-dot{background:radial-gradient(circle at 30% 30%,#fff,rgba(220,38,38,.95) 45%,rgba(185,28,28,1) 80%);box-shadow:0 0 0 4px rgba(220,38,38,.14)}\r\n\r\n  table.hours{width:100%;border-collapse:collapse;font-size:14px}\r\n  table.hours th, table.hours td{padding:12px 14px;border-bottom:1px solid rgba(0,0,0,.06);vertical-align:top}\r\n  table.hours th{text-align:left;width:46%;color:#2a2a2a;font-weight:800;background:rgba(255,255,255,.55)}\r\n  table.hours td{font-weight:800;color:#1f1f1f}\r\n\r\n  \/* Highlight row for today *\/\r\n  tr.is-today th, tr.is-today td{\r\n    background:linear-gradient(90deg, rgba(249,115,22,.10), rgba(251,146,60,.05));\r\n  }\r\n<\/style>\r\n\r\n<section class=\"hours-wrap\" aria-label=\"\u0e40\u0e27\u0e25\u0e32\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23\">\r\n  <div class=\"hours-title\">\r\n    <h2>\u0e40\u0e27\u0e25\u0e32\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23<\/h2>\r\n    <span class=\"hours-badge\">Opening Hours<\/span>\r\n  <\/div>\r\n\r\n  <div class=\"hours-grid\">\r\n\r\n    <!-- \u0e28\u0e39\u0e19\u0e22\u0e4c\u0e2d\u0e38\u0e14\u0e23 -->\r\n    <article class=\"hours-card\" data-center=\"udon\">\r\n      <header class=\"hours-head\">\r\n        <h3 class=\"name\"><span class=\"hours-icon\">\u23f0<\/span> \u0e28\u0e39\u0e19\u0e22\u0e4c\u0e2d\u0e38\u0e14\u0e23<\/h3>\r\n        <div class=\"hours-meta\">\r\n          <span class=\"hours-now\" data-now>\u0e01\u0e33\u0e25\u0e31\u0e07\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e40\u0e27\u0e25\u0e32\u2026<\/span>\r\n          <span class=\"hours-status is-closed\" data-status><span class=\"s-dot\"><\/span> \u0e01\u0e33\u0e25\u0e31\u0e07\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u2026<\/span>\r\n        <\/div>\r\n      <\/header>\r\n\r\n      <table class=\"hours\" role=\"table\" aria-label=\"\u0e28\u0e39\u0e19\u0e22\u0e4c\u0e2d\u0e38\u0e14\u0e23 \u0e40\u0e27\u0e25\u0e32\u0e40\u0e1b\u0e34\u0e14-\u0e1b\u0e34\u0e14\">\r\n        <tbody>\r\n          <tr data-days=\"1,2,3,4,5\" data-open=\"08:00\" data-close=\"19:00\">\r\n            <th>\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c \u2013 \u0e28\u0e38\u0e01\u0e23\u0e4c<\/th>\r\n            <td>08.00 \u2013 17.00 \u0e19.<\/td>\r\n          <\/tr>\r\n          <tr data-days=\"0,6\" data-open=\"08:00\" data-close=\"17:00\">\r\n            <th>\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c \u2013 \u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c<\/th>\r\n            <td>08.00 \u2013 17.00 \u0e19.<\/td>\r\n          <\/tr>\r\n        <\/tbody>\r\n      <\/table>\r\n    <\/article>\r\n\r\n    <!-- \u0e28\u0e39\u0e19\u0e22\u0e4c\u0e2a\u0e32\u0e21\u0e1e\u0e23\u0e49\u0e32\u0e27 -->\r\n    <article class=\"hours-card\" data-center=\"samprao\">\r\n      <header class=\"hours-head\">\r\n        <h3 class=\"name\"><span class=\"hours-icon\">\ud83d\udccd<\/span> \u0e28\u0e39\u0e19\u0e22\u0e4c\u0e2a\u0e32\u0e21\u0e1e\u0e23\u0e49\u0e32\u0e27<\/h3>\r\n        <div class=\"hours-meta\">\r\n          <span class=\"hours-now\" data-now>\u0e01\u0e33\u0e25\u0e31\u0e07\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e40\u0e27\u0e25\u0e32\u2026<\/span>\r\n          <span class=\"hours-status is-closed\" data-status><span class=\"s-dot\"><\/span> \u0e01\u0e33\u0e25\u0e31\u0e07\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u2026<\/span>\r\n        <\/div>\r\n      <\/header>\r\n\r\n      <table class=\"hours\" role=\"table\" aria-label=\"\u0e28\u0e39\u0e19\u0e22\u0e4c\u0e2a\u0e32\u0e21\u0e1e\u0e23\u0e49\u0e32\u0e27 \u0e40\u0e27\u0e25\u0e32\u0e40\u0e1b\u0e34\u0e14-\u0e1b\u0e34\u0e14\">\r\n        <tbody>\r\n          <tr data-days=\"1,2,3,4,5\" data-open=\"08:00\" data-close=\"17:00\">\r\n            <th>\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c \u2013 \u0e28\u0e38\u0e01\u0e23\u0e4c<\/th>\r\n            <td>08.00 \u2013 17.00 \u0e19.<\/td>\r\n          <\/tr>\r\n          <tr data-days=\"6\" data-open=\"08:00\" data-close=\"17:00\">\r\n            <th>\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c<\/th>\r\n            <td>08.00 \u2013 17.00 \u0e19.<\/td>\r\n          <\/tr>\r\n          <tr data-days=\"0\" data-closed=\"1\">\r\n            <th>\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c<\/th>\r\n            <td>\u0e2b\u0e22\u0e38\u0e14\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23<\/td>\r\n          <\/tr>\r\n        <\/tbody>\r\n      <\/table>\r\n    <\/article>\r\n\r\n  <\/div>\r\n<\/section>\r\n\r\n<script>\r\n(function(){\r\n  \/\/ ===== Helpers =====\r\n  function nowBangkok(){\r\n    const parts = new Intl.DateTimeFormat('en-GB', {\r\n      timeZone: 'Asia\/Bangkok',\r\n      year:'numeric', month:'2-digit', day:'2-digit',\r\n      hour:'2-digit', minute:'2-digit', second:'2-digit', hourCycle:'h23',\r\n      weekday:'short'\r\n    }).formatToParts(new Date());\r\n\r\n    const map = {};\r\n    for (const p of parts) if (p.type !== 'literal') map[p.type] = p.value;\r\n\r\n    const y = Number(map.year), m = Number(map.month), d = Number(map.day);\r\n    const hh = Number(map.hour), mm = Number(map.minute), ss = Number(map.second);\r\n    return { y,m,d, hh,mm,ss, weekday: map.weekday };\r\n  }\r\n\r\n  function pad2(n){ return String(n).padStart(2,'0'); }\r\n  function toMin(hhmm){\r\n    const [h,m] = hhmm.split(':').map(Number);\r\n    return h*60 + m;\r\n  }\r\n  function fmtHM(totalMin){\r\n    totalMin = Math.max(0, Math.round(totalMin));\r\n    const h = Math.floor(totalMin \/ 60);\r\n    const m = totalMin % 60;\r\n    if (h <= 0) return `${m} \u0e19\u0e32\u0e17\u0e35`;\r\n    return `${h} \u0e0a\u0e21. ${m} \u0e19\u0e32\u0e17\u0e35`;\r\n  }\r\n  function bangkokDow(y,m,d){\r\n    const dt = new Date(Date.UTC(y, m-1, d, 0, 0, 0));\r\n    return dt.getUTCDay(); \/\/ 0=Sun..6=Sat\r\n  }\r\n\r\n  function findRuleForDow(rows, dow){\r\n    for (const tr of rows){\r\n      const days = (tr.getAttribute('data-days') || '')\r\n        .split(',').map(s=>s.trim()).filter(Boolean).map(Number);\r\n      if (days.includes(dow)){\r\n        const isClosed = tr.getAttribute('data-closed') === '1';\r\n        return {\r\n          tr,\r\n          isClosed,\r\n          open: tr.getAttribute('data-open') || null,\r\n          close: tr.getAttribute('data-close') || null\r\n        };\r\n      }\r\n    }\r\n    return null;\r\n  }\r\n\r\n  \/\/ \u0e2b\u0e32 \u201c\u0e27\u0e31\u0e19\u0e16\u0e31\u0e14\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e34\u0e14\u201d \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e23\u0e13\u0e35\u0e1b\u0e34\u0e14\u0e41\u0e25\u0e49\u0e27\/\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49\u0e2b\u0e22\u0e38\u0e14\r\n  function findNextOpen(rows, todayDow){\r\n    for (let step=1; step<=7; step++){\r\n      const dow = (todayDow + step) % 7;\r\n      const r = findRuleForDow(rows, dow);\r\n      if (r && !r.isClosed && r.open && r.close){\r\n        return { step, dow, open: r.open, close: r.close };\r\n      }\r\n    }\r\n    return null;\r\n  }\r\n\r\n  function setStatus(el, klass, html){\r\n    el.classList.remove('is-open','is-closed','is-holiday');\r\n    el.classList.add(klass);\r\n    el.innerHTML = `<span class=\"s-dot\"><\/span> ${html}`;\r\n  }\r\n\r\n  \/\/ ===== Main per card =====\r\n  function updateCard(card){\r\n    const n = nowBangkok();\r\n    const dow = bangkokDow(n.y, n.m, n.d);\r\n    const minutesNow = n.hh*60 + n.mm;\r\n\r\n    const nowEl = card.querySelector('[data-now]');\r\n    if (nowEl) nowEl.textContent = `\u0e40\u0e27\u0e25\u0e32\u0e44\u0e17\u0e22: ${pad2(n.hh)}:${pad2(n.mm)} \u0e19.`;\r\n\r\n    const rows = Array.from(card.querySelectorAll('tbody tr'));\r\n    \/\/ highlight \u0e41\u0e16\u0e27\u0e02\u0e2d\u0e07\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49\r\n    card.querySelectorAll('tr').forEach(tr => tr.classList.remove('is-today'));\r\n\r\n    const todayRule = findRuleForDow(rows, dow);\r\n    if (todayRule) todayRule.tr.classList.add('is-today');\r\n\r\n    const statusEl = card.querySelector('[data-status]');\r\n    if (!statusEl || !todayRule){\r\n      if (statusEl) setStatus(statusEl, 'is-closed', '\u0e44\u0e21\u0e48\u0e1e\u0e1a\u0e15\u0e32\u0e23\u0e32\u0e07\u0e40\u0e27\u0e25\u0e32');\r\n      return;\r\n    }\r\n\r\n    \/\/ \u0e27\u0e31\u0e19\u0e19\u0e35\u0e49\u0e2b\u0e22\u0e38\u0e14\r\n    if (todayRule.isClosed){\r\n      const next = findNextOpen(rows, dow);\r\n      if (next){\r\n        const dayNames = ['\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c','\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c','\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23','\u0e1e\u0e38\u0e18','\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35','\u0e28\u0e38\u0e01\u0e23\u0e4c','\u0e40\u0e2a\u0e32\u0e23\u0e4c'];\r\n        setStatus(statusEl, 'is-holiday',\r\n          `\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49\u0e2b\u0e22\u0e38\u0e14 \u2022 \u0e40\u0e1b\u0e34\u0e14\u0e27\u0e31\u0e19${dayNames[next.dow]} ${next.open} \u0e19.`\r\n        );\r\n      } else {\r\n        setStatus(statusEl, 'is-holiday', '\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49\u0e2b\u0e22\u0e38\u0e14\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23');\r\n      }\r\n      return;\r\n    }\r\n\r\n    \/\/ \u0e27\u0e31\u0e19\u0e40\u0e1b\u0e34\u0e14 (\u0e21\u0e35\u0e40\u0e27\u0e25\u0e32)\r\n    const openMin = toMin(todayRule.open);\r\n    const closeMin = toMin(todayRule.close);\r\n\r\n    \/\/ \u0e40\u0e1c\u0e37\u0e48\u0e2d\u0e01\u0e23\u0e13\u0e35\u0e02\u0e49\u0e32\u0e21\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07\u0e04\u0e37\u0e19\r\n    const spansMidnight = closeMin < openMin;\r\n\r\n    let isOpen = false;\r\n    if (!spansMidnight){\r\n      isOpen = (minutesNow >= openMin && minutesNow < closeMin);\r\n    } else {\r\n      isOpen = (minutesNow >= openMin || minutesNow < closeMin);\r\n    }\r\n\r\n    if (isOpen){\r\n      \/\/ \u0e40\u0e2b\u0e25\u0e37\u0e2d\u0e2d\u0e35\u0e01\u0e01\u0e35\u0e48\u0e19\u0e32\u0e17\u0e35\u0e08\u0e30\u0e1b\u0e34\u0e14\r\n      let minsLeft;\r\n      if (!spansMidnight){\r\n        minsLeft = closeMin - minutesNow;\r\n      } else {\r\n        \/\/ \u0e16\u0e49\u0e32\u0e40\u0e1b\u0e34\u0e14\u0e02\u0e49\u0e32\u0e21\u0e04\u0e37\u0e19: \u0e16\u0e49\u0e32\u0e2d\u0e22\u0e39\u0e48\u0e01\u0e48\u0e2d\u0e19 close => close - now, \u0e16\u0e49\u0e32\u0e2d\u0e22\u0e39\u0e48\u0e2b\u0e25\u0e31\u0e07 open => (24h-now)+close\r\n        minsLeft = (minutesNow < closeMin) ? (closeMin - minutesNow) : ((24*60 - minutesNow) + closeMin);\r\n      }\r\n      setStatus(statusEl, 'is-open',\r\n        `\u0e40\u0e1b\u0e34\u0e14\u0e2d\u0e22\u0e39\u0e48 \u2022 \u0e1b\u0e34\u0e14 ${todayRule.close} \u0e19. (\u0e40\u0e2b\u0e25\u0e37\u0e2d\u0e2d\u0e35\u0e01 ${fmtHM(minsLeft)})`\r\n      );\r\n    } else {\r\n      \/\/ \u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e40\u0e1b\u0e34\u0e14 \u0e2b\u0e23\u0e37\u0e2d\u0e1b\u0e34\u0e14\u0e41\u0e25\u0e49\u0e27\r\n      \/\/ \u0e16\u0e49\u0e32\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e16\u0e36\u0e07\u0e40\u0e27\u0e25\u0e32\u0e40\u0e1b\u0e34\u0e14\u0e02\u0e2d\u0e07\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49 (\u0e01\u0e23\u0e13\u0e35\u0e44\u0e21\u0e48\u0e02\u0e49\u0e32\u0e21\u0e04\u0e37\u0e19)\r\n      if (!spansMidnight && minutesNow < openMin){\r\n        const minsToOpen = openMin - minutesNow;\r\n        setStatus(statusEl, 'is-closed',\r\n          `\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e40\u0e1b\u0e34\u0e14 \u2022 \u0e40\u0e1b\u0e34\u0e14 ${todayRule.open} \u0e19. (\u0e2d\u0e35\u0e01 ${fmtHM(minsToOpen)})`\r\n        );\r\n      } else {\r\n        \/\/ \u0e1b\u0e34\u0e14\u0e41\u0e25\u0e49\u0e27 \u2192 \u0e2b\u0e32\u0e40\u0e27\u0e25\u0e32\u0e40\u0e1b\u0e34\u0e14\u0e04\u0e23\u0e31\u0e49\u0e07\u0e16\u0e31\u0e14\u0e44\u0e1b\r\n        const next = findNextOpen(rows, dow);\r\n        if (next){\r\n          const dayNames = ['\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c','\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c','\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23','\u0e1e\u0e38\u0e18','\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35','\u0e28\u0e38\u0e01\u0e23\u0e4c','\u0e40\u0e2a\u0e32\u0e23\u0e4c'];\r\n          if (next.step === 1){\r\n            setStatus(statusEl, 'is-closed',\r\n              `\u0e1b\u0e34\u0e14\u0e41\u0e25\u0e49\u0e27 \u2022 \u0e40\u0e1b\u0e34\u0e14\u0e1e\u0e23\u0e38\u0e48\u0e07\u0e19\u0e35\u0e49 ${next.open} \u0e19.`\r\n            );\r\n          } else {\r\n            setStatus(statusEl, 'is-closed',\r\n              `\u0e1b\u0e34\u0e14\u0e41\u0e25\u0e49\u0e27 \u2022 \u0e40\u0e1b\u0e34\u0e14\u0e27\u0e31\u0e19${dayNames[next.dow]} ${next.open} \u0e19.`\r\n            );\r\n          }\r\n        } else {\r\n          setStatus(statusEl, 'is-closed', '\u0e1b\u0e34\u0e14\u0e41\u0e25\u0e49\u0e27');\r\n        }\r\n      }\r\n    }\r\n  }\r\n\r\n  function tick(){\r\n    document.querySelectorAll('.hours-card').forEach(updateCard);\r\n  }\r\n\r\n  tick();\r\n  setInterval(tick, 30000); \/\/ \u0e2d\u0e31\u0e1b\u0e40\u0e14\u0e15\u0e17\u0e38\u0e01 30 \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35\r\n})();\r\n<\/script>\r\n\r\n\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>\u0e40\u0e27\u0e25\u0e32\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23 \u0e2b\u0e49&#8230;<\/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-22289","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/library.udru.ac.th\/index.php?rest_route=\/wp\/v2\/pages\/22289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/library.udru.ac.th\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/library.udru.ac.th\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/library.udru.ac.th\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/library.udru.ac.th\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=22289"}],"version-history":[{"count":7,"href":"https:\/\/library.udru.ac.th\/index.php?rest_route=\/wp\/v2\/pages\/22289\/revisions"}],"predecessor-version":[{"id":22298,"href":"https:\/\/library.udru.ac.th\/index.php?rest_route=\/wp\/v2\/pages\/22289\/revisions\/22298"}],"wp:attachment":[{"href":"https:\/\/library.udru.ac.th\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}