{"id":4319,"date":"2025-11-26T15:59:44","date_gmt":"2025-11-26T08:59:44","guid":{"rendered":"https:\/\/www.enagic.co.th\/?page_id=4319"},"modified":"2025-11-26T16:04:20","modified_gmt":"2025-11-26T09:04:20","slug":"mfg-check","status":"publish","type":"page","link":"https:\/\/www.enagic.co.th\/th\/mfg-check\/","title":{"rendered":"MFG Check"},"content":{"rendered":"<p><!DOCTYPE html><br \/>\n<html lang=\"en\"><br \/>\n<head><br \/>\n    <meta charset=\"UTF-8\"><br \/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\"><br \/>\n    <meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><br \/>\n    <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"><br \/>\n    <meta name=\"theme-color\" content=\"#ffffff\"><br \/>\n    <title>Mfg Date Decoder<\/title><\/p>\n<style>\n        \/* Reset & Base *\/\n        * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }\n        body {\n            font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;\n            background-color: #f2f2f7; \/* iOS Light Gray *\/\n            color: #000;\n            display: flex;\n            flex-direction: column;\n            align-items: center;\n            justify-content: center;\n            min-height: 100vh;\n            margin: 0;\n            padding: 20px;\n        }<\/p>\n<p>        \/* App Container *\/\n        .app-container {\n            background-color: #fff;\n            width: 100%;\n            max-width: 400px;\n            border-radius: 24px;\n            padding: 40px 30px;\n            box-shadow: 0 10px 40px rgba(0,0,0,0.1);\n            text-align: center;\n        }<\/p>\n<p>        \/* Header *\/\n        h1 {\n            margin: 0;\n            font-size: 22px;\n            font-weight: 700;\n            color: #1c1c1e;\n        }\n        p.subtitle {\n            margin: 8px 0 30px 0;\n            font-size: 15px;\n            color: #8e8e93;\n        }<\/p>\n<p>        \/* Input Area *\/\n        .input-wrapper {\n            position: relative;\n            margin-bottom: 30px;\n        }<\/p>\n<p>        input[type=\"text\"] {\n            width: 100%;\n            font-size: 48px;\n            font-weight: 700;\n            text-align: center;\n            letter-spacing: 12px;\n            color: #000;\n            border: none;\n            border-bottom: 2px solid #e5e5ea;\n            border-radius: 0;\n            padding: 10px 0;\n            background: transparent;\n            text-transform: uppercase;\n            outline: none;\n            transition: border-color 0.3s ease;\n        }<\/p>\n<p>        input[type=\"text\"]:focus {\n            border-color: #007aff; \/* iOS Blue *\/\n        }<\/p>\n<p>        input::placeholder {\n            color: #d1d1d6;\n            letter-spacing: 4px;\n        }<\/p>\n<p>        \/* Result Area *\/\n        .result-card {\n            background-color: #f2f2f7;\n            border-radius: 16px;\n            padding: 25px;\n            transition: all 0.3s ease;\n            opacity: 0.6;\n            transform: scale(0.98);\n        }<\/p>\n<p>        .result-card.active {\n            opacity: 1;\n            transform: scale(1);\n            background-color: #e4f9e8; \/* Light Green Bg *\/\n            color: #007aff;\n        }<\/p>\n<p>        .result-card.error {\n            opacity: 1;\n            transform: scale(1);\n            background-color: #ffe5e5; \/* Light Red Bg *\/\n        }<\/p>\n<p>        .label {\n            display: block;\n            font-size: 11px;\n            text-transform: uppercase;\n            letter-spacing: 1px;\n            font-weight: 600;\n            color: #8e8e93;\n            margin-bottom: 5px;\n        }<\/p>\n<p>        .date-output {\n            display: block;\n            font-size: 28px;\n            font-weight: 600;\n            color: #1c1c1e;\n        }<\/p>\n<p>        .result-card.active .date-output {\n            color: #34c759; \/* iOS Green *\/\n        }<\/p>\n<p>        .result-card.error .date-output {\n            color: #ff3b30; \/* iOS Red *\/\n            font-size: 20px;\n        }<\/p>\n<p>        \/* Reset Button *\/\n        .reset-btn {\n            margin-top: 30px;\n            background: none;\n            border: none;\n            color: #007aff;\n            font-size: 16px;\n            cursor: pointer;\n            padding: 10px;\n        }<\/p>\n<p>        .footer {\n            margin-top: 40px;\n            font-size: 12px;\n            color: #c7c7cc;\n        }<\/p>\n<\/style>\n<p><\/head><br \/>\n<body><\/p>\n<div class=\"app-container\">\n<h1>Date Decoder<\/h1>\n<p class=\"subtitle\">Enter 2-letter batch code<\/p>\n<div class=\"input-wrapper\">\n            <input type=\"text\" id=\"code\" maxlength=\"2\" placeholder=\"XY\" autocomplete=\"off\" spellcheck=\"false\"><\/div>\n<div id=\"result\" class=\"result-card\">\n            <span class=\"label\">Manufacturing Date<\/span><br \/>\n            <span id=\"dateText\" class=\"date-output\">&#8212;<\/span><\/div>\n<p><button class=\"reset-btn\" onclick=\"resetApp()\">Clear<\/button><\/p>\n<div class=\"footer\">Format: Year + Month<\/div>\n<\/div>\n<p><script>\n    \/\/ Configuration Data\n    const years = {\n        '8': '2008', '9': '2009', '0': '2010', '1': '2011', '2': '2012',\n        '3': '2013', '4': '2014', 'N': '2015', 'P': '2016', 'Q': '2017',\n        'R': '2018', 'S': '2019', 'T': '2020', 'U': '2021', 'V': '2022',\n        'W': '2023', 'X': '2024', 'Y': '2025', 'Z': '2026'\n    };<\/p>\n<p>    const months = {\n        'A': 'Jan', 'B': 'Feb', 'C': 'Mar', 'D': 'Apr', 'E': 'May', 'F': 'Jun',\n        'G': 'Jul', 'H': 'Aug', 'J': 'Sep', 'X': 'Oct', 'Y': 'Nov', 'Z': 'Dec'\n    };<\/p>\n<p>    const inputEl = document.getElementById('code');\n    const resultEl = document.getElementById('result');\n    const textEl = document.getElementById('dateText');<\/p>\n<p>    \/\/ Focus input on load\n    window.onload = () => inputEl.focus();<\/p>\n<p>    inputEl.addEventListener('input', function() {\n        \/\/ Auto Uppercase\n        let val = this.value.toUpperCase();\n        this.value = val;<\/p>\n<p>        \/\/ Reset UI if empty\n        if (val.length < 2) {\n            resultEl.className = 'result-card';\n            textEl.innerText = '--';\n            return;\n        }\n\n        \/\/ Decode\n        const yChar = val[0];\n        const mChar = val[1];\n\n        const year = years[yChar];\n        const month = months[mChar];\n\n        if (year &#038;&#038; month) {\n            \/\/ Success\n            textEl.innerText = `${month} ${year}`;\n            resultEl.className = 'result-card active';\n            inputEl.blur(); \/\/ Close keyboard on success\n        } else {\n            \/\/ Error handling\n            let errorMsg = \"Invalid Code\";\n            if (!year &#038;&#038; !month) errorMsg = \"Invalid Year &#038; Month\";\n            else if (!year) errorMsg = \"Invalid Year Code\";\n            else if (!month) errorMsg = \"Invalid Month Code\";\n            \n            textEl.innerText = errorMsg;\n            resultEl.className = 'result-card error';\n        }\n    });\n\n    function resetApp() {\n        inputEl.value = '';\n        resultEl.className = 'result-card';\n        textEl.innerText = '--';\n        inputEl.focus();\n    }\n<\/script><\/p>\n<p><\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mfg Date Decoder Date Decoder Enter 2-letter batch code Manufacturing Date &#8212; Clear Format: Year + Month<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"_links":{"self":[{"href":"https:\/\/www.enagic.co.th\/th\/wp-json\/wp\/v2\/pages\/4319"}],"collection":[{"href":"https:\/\/www.enagic.co.th\/th\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.enagic.co.th\/th\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.enagic.co.th\/th\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.enagic.co.th\/th\/wp-json\/wp\/v2\/comments?post=4319"}],"version-history":[{"count":3,"href":"https:\/\/www.enagic.co.th\/th\/wp-json\/wp\/v2\/pages\/4319\/revisions"}],"predecessor-version":[{"id":4323,"href":"https:\/\/www.enagic.co.th\/th\/wp-json\/wp\/v2\/pages\/4319\/revisions\/4323"}],"wp:attachment":[{"href":"https:\/\/www.enagic.co.th\/th\/wp-json\/wp\/v2\/media?parent=4319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}