{"id":1105,"date":"2025-10-16T06:43:25","date_gmt":"2025-10-16T06:43:25","guid":{"rendered":"https:\/\/www.globalhealthmag.com\/?page_id=1105"},"modified":"2025-10-16T06:57:25","modified_gmt":"2025-10-16T06:57:25","slug":"calculadora-do-sono","status":"publish","type":"page","link":"https:\/\/www.globalhealthmag.com\/pt\/calculadora-do-sono\/","title":{"rendered":"Calculadora do sono"},"content":{"rendered":"\n<!-- Modern Sleep Schedule Calculator -->\n<style>\n  \/* Container *\/\n  #sleep-calculator {\n    max-width:720px;\n    margin:30px auto;\n    padding:25px;\n    font-family: 'Inter', system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial;\n    border-radius:16px;\n    background: linear-gradient(135deg, #e0f7fa, #ffffff);\n    box-shadow: 0 12px 30px rgba(0,0,0,0.08);\n  }\n\n  \/* Headings *\/\n  #sleep-calculator h2 {\n    text-align:center;\n    font-size:26px;\n    color:#027a8a;\n    margin-bottom:20px;\n  }\n\n  label {\n    display:block;\n    font-weight:600;\n    color:#05575a;\n    margin:12px 0 6px;\n  }\n\n  \/* Dropdowns *\/\n  select {\n    width:100%;\n    padding:10px;\n    border-radius:10px;\n    border:1px solid #b2ebf2;\n    font-size:15px;\n    background:#ffffff;\n    color:#033a3f;\n    transition: all 0.2s ease;\n  }\n\n  select:hover, select:focus {\n    border-color:#00acc1;\n    box-shadow:0 2px 8px rgba(0,172,193,0.2);\n    outline:none;\n  }\n\n  \/* Row layout *\/\n  .row { display:flex; gap:10px; align-items:center; margin-bottom:10px; }\n  .col { flex:1; }\n  .small { flex:0 0 110px; }\n\n  \/* Button *\/\n  button#calculateSleep {\n    width:100%;\n    padding:14px;\n    margin-top:14px;\n    border-radius:12px;\n    border:none;\n    font-weight:700;\n    font-size:16px;\n    color:#fff;\n    background: linear-gradient(90deg,#00bfa5,#009688);\n    cursor:pointer;\n    transition: all 0.3s ease;\n    box-shadow: 0 6px 18px rgba(0,150,136,0.25);\n  }\n  button#calculateSleep:hover {\n    transform: translateY(-2px);\n    box-shadow: 0 10px 22px rgba(0,150,136,0.35);\n  }\n\n  \/* Result container *\/\n  #sleepResult { margin-top:22px; display:none; }\n\n  \/* Result card *\/\n  .result-card {\n    display:grid;\n    grid-template-columns:1fr 260px;\n    gap:16px;\n    padding:18px;\n    border-radius:14px;\n    background: linear-gradient(180deg,#ffffff,#e0f7fa);\n    box-shadow:0 6px 18px rgba(0,0,0,0.08);\n    margin-bottom:18px;\n    align-items:center;\n  }\n\n  .result-text {\n    color:#054f56;\n    line-height:1.5;\n  }\n  .result-text h4 {\n    margin:0 0 8px;\n    font-size:16px;\n    font-weight:700;\n  }\n\n  .time-box {\n    background:#ffffff;\n    border-radius:10px;\n    padding:10px 14px;\n    display:inline-block;\n    text-align:center;\n    border:1px solid #b2ebf2;\n    min-width:100px;\n    transition: all 0.2s ease;\n  }\n  .time-box .t {\n    font-size:22px;\n    font-weight:800;\n    color:#02666e;\n    display:block;\n  }\n  .time-box .ampm {\n    font-size:13px;\n    color:#00838f;\n    margin-top:3px;\n  }\n\n  .clock-wrap {\n    display:flex;\n    gap:14px;\n    align-items:center;\n    justify-content:center;\n  }\n\n  \/* Floating clocks *\/\n  .float-clock {\n    width:140px;\n    height:140px;\n    border-radius:50%;\n    background: linear-gradient(135deg,#ffffff,#b2ebf2);\n    box-shadow: 0 8px 24px rgba(0,0,0,0.08), inset 0 -6px 20px rgba(0,0,0,0.02);\n    display:flex;\n    align-items:center;\n    justify-content:center;\n    position:relative;\n    overflow:hidden;\n    animation: floaty 5s ease-in-out infinite;\n    border:3px solid rgba(0,150,136,0.12);\n  }\n  @keyframes floaty { 0%{ transform:translateY(0);} 50%{ transform:translateY(-8px);} 100%{ transform:translateY(0);} }\n\n  .clock-face {\n    width:90px;\n    height:90px;\n    border-radius:50%;\n    background:#ffffff;\n    display:grid;\n    place-items:center;\n    position:relative;\n  }\n\n  .clock-label {\n    font-weight:700;\n    font-size:14px;\n    color:#02666e;\n    text-align:center;\n    margin-top:6px;\n  }\n\n  .clock-time {\n    font-weight:800;\n    font-size:20px;\n    color:#02666e;\n  }\n\n  \/* Responsive *\/\n  @media (max-width:720px){\n    .result-card{ grid-template-columns:1fr; text-align:center; }\n    .clock-wrap{ justify-content:center; margin-top:12px; }\n  }\n<\/style>\n\n<div id=\"sleep-calculator\">\n  <h2>Sleep Schedule \u2014 Smart Recommendations<\/h2>\n\n  <label>Age Range<\/label>\n  <select id=\"ageRange\">\n    <option>0-3 Months<\/option>\n    <option>4-11 Months<\/option>\n    <option>1-2 Years<\/option>\n    <option>3-5 Years<\/option>\n    <option>6-13 Years<\/option>\n    <option>14-17 Years<\/option>\n    <option>18-25 Years<\/option>\n    <option>26-35 Years<\/option>\n    <option selected>36-45 Years<\/option>\n    <option>46-55 Years<\/option>\n    <option>56-64 Years<\/option>\n    <option>65+ Years<\/option>\n  <\/select>\n\n  <label>I want to go to bed at<\/label>\n  <div class=\"row\">\n    <div class=\"col small\"><select id=\"bedHour\"><\/select><\/div>\n    <div class=\"col small\"><select id=\"bedMin\"><\/select><\/div>\n    <div class=\"col small\"><select id=\"bedAmPm\"><option>AM<\/option><option selected>PM<\/option><\/select><\/div>\n  <\/div>\n\n  <label>I want to wake up at<\/label>\n  <div class=\"row\">\n    <div class=\"col small\"><select id=\"wakeHour\"><\/select><\/div>\n    <div class=\"col small\"><select id=\"wakeMin\"><\/select><\/div>\n    <div class=\"col small\"><select id=\"wakeAmPm\"><option>AM<\/option><option>PM<\/option><\/select><\/div>\n  <\/div>\n\n  <button id=\"calculateSleep\">Calculate<\/button>\n  <div id=\"sleepResult\"><\/div>\n<\/div>\n\n<script>\n(function(){\n  function populate(selectEl,start,end){\n    selectEl.innerHTML=\"\";\n    for(let i=start;i<=end;i++){\n      const opt=document.createElement(\"option\");\n      opt.value=i;\n      opt.textContent=i<10? \"0\"+i:i;\n      selectEl.appendChild(opt);\n    }\n  }\n\n  const bedHour = document.getElementById(\"bedHour\");\n  const bedMin = document.getElementById(\"bedMin\");\n  const wakeHour= document.getElementById(\"wakeHour\");\n  const wakeMin = document.getElementById(\"wakeMin\");\n  populate(bedHour,1,12);\n  populate(wakeHour,1,12);\n  populate(bedMin,0,59);\n  populate(wakeMin,0,59);\n\n  const bedAmPm=document.getElementById(\"bedAmPm\");\n  const wakeAmPm=document.getElementById(\"wakeAmPm\");\n  const ageRange=document.getElementById(\"ageRange\");\n\n  function to24(hour,ampm){hour=parseInt(hour,10); return ampm===\"PM\"? (hour%12)+12 : hour%12;}\n  function pad(n){return n<10? \"0\"+n:n;}\n\n  function format24(totalMins){\n    totalMins=((totalMins%(24*60))+(24*60))%(24*60);\n    let hr=Math.floor(totalMins\/60), min=Math.round(totalMins%60);\n    let ampm=hr>=12?\"PM\":\"AM\"; hr=hr%12; if(hr===0) hr=12;\n    return {hour:pad(hr), min:pad(min), ampm:ampm, text:pad(hr)+\":\"+pad(min)+\" \"+ampm};\n  }\n\n  function minsFromInputs(hourEl,minEl,ampmEl){\n    return to24(hourEl.value,ampmEl.value)*60 + parseInt(minEl.value,10);\n  }\n\n  function createClockHTML(label,timeText){\n    return `<div style=\"display:flex;flex-direction:column;align-items:center;\">\n      <div class=\"float-clock\"><div class=\"clock-face\"><div style=\"text-align:center;\">\n      <div class=\"clock-time\">${timeText.split(' ')[0]}<\/div>\n      <div class=\"clock-label\">${timeText.split(' ')[1]}<\/div><\/div><\/div><\/div>\n      <div style=\"margin-top:6px;font-weight:700;color:#02666e;text-align:center;\">${label}<\/div>\n    <\/div>`;\n  }\n\n  document.getElementById(\"calculateSleep\").addEventListener(\"click\",function(){\n    const age=ageRange.value;\n    const bedMins=minsFromInputs(bedHour,bedMin,bedAmPm);\n    const wakeMins=minsFromInputs(wakeHour,wakeMin,wakeAmPm);\n\n    const cycles=[6,5];\n    let resultHtml=`<h3 style=\"margin:0 0 10px;color:#027a8a;\">Results<\/h3>\n      <p style=\"margin-bottom:12px;\">It typically takes <strong>15 minutes<\/strong> to fall asleep. For <strong>${age}<\/strong> going to sleep at <strong>${pad(parseInt(bedHour.value))}:${pad(parseInt(bedMin.value))} ${bedAmPm.value}<\/strong>, recommended wake times are:<\/p>`;\n\n    cycles.forEach(cycle=>{\n      const sleepMinutes=cycle*90;\n      const totalWake=bedMins+sleepMinutes+15;\n      const wakeFormatted=format24(totalWake);\n      const hoursInBed=((sleepMinutes+15)\/60).toFixed(2);\n\n      resultHtml+=`<div class=\"result-card\">\n        <div class=\"result-text\">\n          <h4>${cycle} Sleep Cycles<\/h4>\n          <div style=\"display:flex;gap:10px;justify-content:space-between;align-items:center;\">\n            <div>\n              <div class=\"muted\">Go to<br>sleep at<\/div>\n              <div class=\"time-box\"><span class=\"t\">${pad(parseInt(bedHour.value))}:${pad(parseInt(bedMin.value))}<\/span><span class=\"ampm\">${bedAmPm.value}<\/span><\/div>\n            <\/div>\n            <div style=\"text-align:right;\">\n              <div class=\"muted\">Recommended<br>wake time<\/div>\n              <div class=\"time-box\"><span class=\"t\">${wakeFormatted.text.split(' ')[0]}<\/span><span class=\"ampm\">${wakeFormatted.ampm}<\/span><\/div>\n            <\/div>\n          <\/div>\n          <div style=\"margin-top:10px;\" class=\"muted\">Hours in Bed: <strong>${hoursInBed} h<\/strong><\/div>\n        <\/div>\n        <div class=\"clock-wrap\">\n          ${createClockHTML(\"Bed Time\",pad(parseInt(bedHour.value))+\":\"+pad(parseInt(bedMin.value))+\" \"+bedAmPm.value)}\n          ${createClockHTML(\"Wake Time\",wakeFormatted.text)}\n        <\/div>\n      <\/div>`;\n    });\n\n    const resultContainer=document.getElementById(\"sleepResult\");\n    resultContainer.style.display=\"block\";\n    resultContainer.innerHTML=resultHtml;\n    resultContainer.scrollIntoView({behavior:\"smooth\", block:\"start\"});\n  });\n})();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Hor\u00e1rio de sono - Recomenda\u00e7\u00f5es inteligentes Faixa et\u00e1ria 0-3 meses4-11 meses1-2 anos3-5 anos6-13 anos14-17 anos18-25 anos26-35 anos36-45 anos46-55 anos56-64 anos65+ anos Quero deitar-me \u00e0s AMPM Quero acordar \u00e0s AMPM Calcular<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1105","page","type-page","status-publish"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Sleep Calculator - GlobalHealth Magazine<\/title>\n<meta name=\"description\" content=\"Sleep Schedule \u2014 Smart Recommendations Age Range 0-3 Months 4-11 Months 1-2 Years 3-5 Years 6-13 Years 14-17 Years 18-25 Years 26-35 Years 36-45 Years\" \/>\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.globalhealthmag.com\/pt\/calculadora-do-sono\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sleep Calculator\" \/>\n<meta property=\"og:description\" content=\"Sleep Schedule \u2014 Smart Recommendations Age Range 0-3 Months 4-11 Months 1-2 Years 3-5 Years 6-13 Years 14-17 Years 18-25 Years 26-35 Years 36-45 Years\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globalhealthmag.com\/pt\/calculadora-do-sono\/\" \/>\n<meta property=\"og:site_name\" content=\"GlobalHealth Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/globalhealthmag\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-16T06:57:25+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Tempo estimado de leitura\" \/>\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.globalhealthmag.com\\\/sleep-calculator\\\/\",\"url\":\"https:\\\/\\\/www.globalhealthmag.com\\\/sleep-calculator\\\/\",\"name\":\"Sleep Calculator - GlobalHealth Magazine\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.globalhealthmag.com\\\/#website\"},\"datePublished\":\"2025-10-16T06:43:25+00:00\",\"dateModified\":\"2025-10-16T06:57:25+00:00\",\"description\":\"Sleep Schedule \u2014 Smart Recommendations Age Range 0-3 Months 4-11 Months 1-2 Years 3-5 Years 6-13 Years 14-17 Years 18-25 Years 26-35 Years 36-45 Years\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.globalhealthmag.com\\\/sleep-calculator\\\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.globalhealthmag.com\\\/sleep-calculator\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.globalhealthmag.com\\\/sleep-calculator\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.globalhealthmag.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sleep Calculator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.globalhealthmag.com\\\/#website\",\"url\":\"https:\\\/\\\/www.globalhealthmag.com\\\/\",\"name\":\"GlobalHealth Magazine\",\"description\":\"Health and Fitness Tips and Advice\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.globalhealthmag.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.globalhealthmag.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-PT\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.globalhealthmag.com\\\/#organization\",\"name\":\"GlobalHealth Magazine\",\"url\":\"https:\\\/\\\/www.globalhealthmag.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\\\/\\\/www.globalhealthmag.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.globalhealthmag.com\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/globalhealthmag-favicon.png\",\"contentUrl\":\"https:\\\/\\\/www.globalhealthmag.com\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/globalhealthmag-favicon.png\",\"width\":512,\"height\":512,\"caption\":\"GlobalHealth Magazine\"},\"image\":{\"@id\":\"https:\\\/\\\/www.globalhealthmag.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/globalhealthmag\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Calculadora do sono - GlobalHealth Magazine","description":"Hor\u00e1rio de sono - Recomenda\u00e7\u00f5es inteligentes Faixa et\u00e1ria 0-3 meses 4-11 meses 1-2 anos 3-5 anos 6-13 anos 14-17 anos 18-25 anos 26-35 anos 36-45 anos","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.globalhealthmag.com\/pt\/calculadora-do-sono\/","og_locale":"pt_PT","og_type":"article","og_title":"Sleep Calculator","og_description":"Sleep Schedule \u2014 Smart Recommendations Age Range 0-3 Months 4-11 Months 1-2 Years 3-5 Years 6-13 Years 14-17 Years 18-25 Years 26-35 Years 36-45 Years","og_url":"https:\/\/www.globalhealthmag.com\/pt\/calculadora-do-sono\/","og_site_name":"GlobalHealth Magazine","article_publisher":"https:\/\/www.facebook.com\/globalhealthmag","article_modified_time":"2025-10-16T06:57:25+00:00","twitter_card":"summary_large_image","twitter_misc":{"Tempo estimado de leitura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.globalhealthmag.com\/sleep-calculator\/","url":"https:\/\/www.globalhealthmag.com\/sleep-calculator\/","name":"Calculadora do sono - GlobalHealth Magazine","isPartOf":{"@id":"https:\/\/www.globalhealthmag.com\/#website"},"datePublished":"2025-10-16T06:43:25+00:00","dateModified":"2025-10-16T06:57:25+00:00","description":"Hor\u00e1rio de sono - Recomenda\u00e7\u00f5es inteligentes Faixa et\u00e1ria 0-3 meses 4-11 meses 1-2 anos 3-5 anos 6-13 anos 14-17 anos 18-25 anos 26-35 anos 36-45 anos","breadcrumb":{"@id":"https:\/\/www.globalhealthmag.com\/sleep-calculator\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globalhealthmag.com\/sleep-calculator\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globalhealthmag.com\/sleep-calculator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globalhealthmag.com\/"},{"@type":"ListItem","position":2,"name":"Sleep Calculator"}]},{"@type":"WebSite","@id":"https:\/\/www.globalhealthmag.com\/#website","url":"https:\/\/www.globalhealthmag.com\/","name":"Revista GlobalHealth","description":"Dicas e conselhos sobre sa\u00fade e boa forma f\u00edsica","publisher":{"@id":"https:\/\/www.globalhealthmag.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globalhealthmag.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-PT"},{"@type":"Organization","@id":"https:\/\/www.globalhealthmag.com\/#organization","name":"Revista GlobalHealth","url":"https:\/\/www.globalhealthmag.com\/","logo":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/www.globalhealthmag.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.globalhealthmag.com\/wp-content\/uploads\/2023\/04\/globalhealthmag-favicon.png","contentUrl":"https:\/\/www.globalhealthmag.com\/wp-content\/uploads\/2023\/04\/globalhealthmag-favicon.png","width":512,"height":512,"caption":"GlobalHealth Magazine"},"image":{"@id":"https:\/\/www.globalhealthmag.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/globalhealthmag"]}]}},"_links":{"self":[{"href":"https:\/\/www.globalhealthmag.com\/pt\/wp-json\/wp\/v2\/pages\/1105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globalhealthmag.com\/pt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.globalhealthmag.com\/pt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.globalhealthmag.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globalhealthmag.com\/pt\/wp-json\/wp\/v2\/comments?post=1105"}],"version-history":[{"count":4,"href":"https:\/\/www.globalhealthmag.com\/pt\/wp-json\/wp\/v2\/pages\/1105\/revisions"}],"predecessor-version":[{"id":1111,"href":"https:\/\/www.globalhealthmag.com\/pt\/wp-json\/wp\/v2\/pages\/1105\/revisions\/1111"}],"wp:attachment":[{"href":"https:\/\/www.globalhealthmag.com\/pt\/wp-json\/wp\/v2\/media?parent=1105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}