{"id":2972,"date":"2025-10-29T21:40:55","date_gmt":"2025-10-29T21:40:55","guid":{"rendered":"https:\/\/olivin.webty.site\/haber\/?page_id=2972"},"modified":"2025-10-29T21:40:55","modified_gmt":"2025-10-29T21:40:55","slug":"gebelik-hesaplama","status":"publish","type":"page","link":"https:\/\/olivin.webty.site\/saglik\/gebelik-hesaplama\/","title":{"rendered":"Gebelik Hesaplama"},"content":{"rendered":"    <div class=\"oli-calculator\">\r\n        <div class=\"oli-calculator-form-groups\">\r\n            <div class=\"calculator-form-group\">\r\n                <label for=\"lmpDate\">Son Adet Tarihi:<\/label>\r\n                <input type=\"date\" id=\"lmpDate\" placeholder=\"Tarih se\u00e7iniz\">\r\n            <\/div>\r\n        <\/div>\r\n        <button onclick=\"calculatePregnancy()\">Hesapla<\/button>\r\n        <div class=\"result\" id=\"pregnancyResult\" style=\"display:none;\"><\/div>\r\n    <\/div>\r\n    <script>\r\n        const calculatePregnancy = () => {\r\n            const dateStr = document.getElementById('lmpDate').value;\r\n            if (!dateStr) {\r\n                alert('L\u00fctfen ge\u00e7erli bir tarih se\u00e7iniz!');\r\n                return;\r\n            }\r\n\r\n            const [year, month, day] = dateStr.split('-').map(Number);\r\n            const today = new Date();\r\n            const lmpDate = new Date(year, month - 1, day);\r\n            if (lmpDate > today) {\r\n                alert('Son adet tarihi bug\u00fcnden b\u00fcy\u00fck olamaz!');\r\n                return;\r\n            }\r\n\r\n            const formatDate = date =>\r\n                String(date.getDate()).padStart(2, '0') + '\/' +\r\n                String(date.getMonth() + 1).padStart(2, '0') + '\/' +\r\n                date.getFullYear();\r\n\r\n            const diffMs = today - lmpDate;\r\n            const totalDays = Math.floor(diffMs \/ (1000 * 60 * 60 * 24));\r\n            const weeks = Math.floor(totalDays \/ 7);\r\n            const days = totalDays % 7;\r\n\r\n            const dueDate = new Date(lmpDate);\r\n            dueDate.setDate(dueDate.getDate() + 280);\r\n\r\n            document.getElementById('pregnancyResult').innerHTML =\r\n                `<p><strong>Gebelik S\u00fcreniz:<\/strong> ${weeks} hafta ${days} g\u00fcn<\/p>` +\r\n                `<p><strong>Ge\u00e7en G\u00fcn Say\u0131s\u0131:<\/strong> ${totalDays} g\u00fcn<\/p>` +\r\n                `<p><strong>Tahmini Do\u011fum Tarihi:<\/strong> ${formatDate(dueDate)}<\/p>` +\r\n                `<p><strong>Bug\u00fcn:<\/strong> ${formatDate(today)}<\/p>` +\r\n                `<p><strong>Son Adet Tarihi:<\/strong> ${formatDate(lmpDate)}<\/p>`;\r\n\r\n            document.getElementById('pregnancyResult').style.display = 'block';\r\n        };\r\n    <\/script>\r\n\n<p><\/p>\n<blockquote><p><span style=\"color: #333;\"><strong>Bu sayfay\u0131 payla\u015f\u0131n:<\/strong><\/span><\/p><\/blockquote>\n<p><\/p>\n<div class=\"oli-social-share-buttons\" title=\"Bu Sayfay\u0131 Payla\u015f\"><li><a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Folivin.webty.site%2Fsaglik%2Fgebelik-hesaplama%2F\" target=\"_blank\" onclick=\"window.open(this.href, '_blank'); return false;\" style=\"background-color: #3b5998;\"><i class=\"fab fa-facebook\"><\/i><span>Facebook<\/span><\/a><\/li><li><a href=\"https:\/\/api.whatsapp.com\/send?text=Gebelik+Hesaplama%20https%3A%2F%2Folivin.webty.site%2Fsaglik%2Fgebelik-hesaplama%2F\" target=\"_blank\" onclick=\"window.open(this.href, '_blank'); return false;\" style=\"background-color: #4dc247;\"><i class=\"fab fa-whatsapp\"><\/i><span>WhatsApp<\/span><\/a><\/li><li><a href=\"https:\/\/x.com\/intent\/post?text=Gebelik+Hesaplama&url=https%3A%2F%2Folivin.webty.site%2Fsaglik%2Fgebelik-hesaplama%2F\" target=\"_blank\" onclick=\"window.open(this.href, '_blank'); return false;\" style=\"background-color: #000000;\"><i class=\"fab fa-x-twitter\"><\/i><span>X<\/span><\/a><\/li><li><a href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=https%3A%2F%2Folivin.webty.site%2Fsaglik%2Fgebelik-hesaplama%2F&title=Gebelik+Hesaplama\" target=\"_blank\" onclick=\"window.open(this.href, '_blank'); return false;\" style=\"background-color: #007bb5;\"><i class=\"fab fa-linkedin\"><\/i><span>LinkedIn<\/span><\/a><\/li><li><a href=\"https:\/\/t.me\/share\/url?url=https%3A%2F%2Folivin.webty.site%2Fsaglik%2Fgebelik-hesaplama%2F&text=Gebelik+Hesaplama\" target=\"_blank\" onclick=\"window.open(this.href, '_blank'); return false;\" style=\"background-color: #0088cc;\"><i class=\"fab fa-telegram\"><\/i><span>Telegram<\/span><\/a><\/li><li><a href=\"mailto:?subject=Gebelik+Hesaplama&body=https%3A%2F%2Folivin.webty.site%2Fsaglik%2Fgebelik-hesaplama%2F\" target=\"_blank\" onclick=\"window.open(this.href, '_blank'); return false;\" style=\"background-color: #e75220;\"><i class=\"fas fa-envelope\"><\/i><span>Email<\/span><\/a><\/li><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Bu sayfay\u0131 payla\u015f\u0131n:<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2972","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/olivin.webty.site\/saglik\/wp-json\/wp\/v2\/pages\/2972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/olivin.webty.site\/saglik\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/olivin.webty.site\/saglik\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/olivin.webty.site\/saglik\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/olivin.webty.site\/saglik\/wp-json\/wp\/v2\/comments?post=2972"}],"version-history":[{"count":0,"href":"https:\/\/olivin.webty.site\/saglik\/wp-json\/wp\/v2\/pages\/2972\/revisions"}],"wp:attachment":[{"href":"https:\/\/olivin.webty.site\/saglik\/wp-json\/wp\/v2\/media?parent=2972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}