{"id":318,"date":"2024-12-26T21:23:42","date_gmt":"2024-12-26T21:23:42","guid":{"rendered":"https:\/\/www.qrngua.website\/?page_id=318"},"modified":"2024-12-26T21:48:02","modified_gmt":"2024-12-26T21:48:02","slug":"%d0%ba%d0%be%d0%bd%d0%b2%d0%b5%d1%80%d1%82%d0%b5%d1%80-%d0%b2%d1%80%d0%b5%d0%bc%d0%b5%d0%bd%d0%b8","status":"publish","type":"page","link":"https:\/\/www.qrngua.website\/?page_id=318","title":{"rendered":"Time converter"},"content":{"rendered":"\n<!DOCTYPE html>\n<html>\n<head>\n    <title>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/title>\n    <style>\n        body {\n            font-family: sans-serif;\n        }\n        .container {\n            display: flex;\n            gap: 20px; \/* \u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 *\/\n        }\n        label {\n            display: block;\n            margin-bottom: 5px;\n        }\n        select, input[type=\"number\"] {\n            width: 200px;\n            padding: 5px;\n            margin-bottom: 10px;\n            box-sizing: border-box;\n        }\n        #result {\n            margin-top: 10px;\n            font-weight: bold;\n        }\n    <\/style>\n<\/head>\n<body>\n\n    <h1>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/h1>\n\n    <div class=\"container\">\n        <div>\n            <label for=\"fromUnit\">\u0418\u0437:<\/label>\n            <select id=\"fromUnit\">\n                <option value=\"nanoseconds\">\u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/option>\n                <option value=\"microseconds\">\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/option>\n                <option value=\"milliseconds\">\u041c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/option>\n                <option value=\"seconds\">\u0421\u0435\u043a\u0443\u043d\u0434\u044b<\/option>\n                <option value=\"minutes\">\u041c\u0438\u043d\u0443\u0442\u044b<\/option>\n                <option value=\"hours\">\u0427\u0430\u0441\u044b<\/option>\n                <option value=\"days\">\u0414\u043d\u0438<\/option>\n            <\/select>\n            <input type=\"number\" id=\"fromValue\" value=\"1\">\n        <\/div>\n\n        <div>\n            <label for=\"toUnit\">\u0412:<\/label>\n            <select id=\"toUnit\">\n                <option value=\"nanoseconds\">\u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/option>\n                <option value=\"microseconds\">\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/option>\n                <option value=\"milliseconds\">\u041c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/option>\n                <option value=\"seconds\">\u0421\u0435\u043a\u0443\u043d\u0434\u044b<\/option>\n                <option value=\"minutes\">\u041c\u0438\u043d\u0443\u0442\u044b<\/option>\n                <option value=\"hours\">\u0427\u0430\u0441\u044b<\/option>\n                <option value=\"days\">\u0414\u043d\u0438<\/option>\n            <\/select>\n        <\/div>\n    <\/div>\n\n    <button id=\"convertButton\">\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/button>\n\n    <div id=\"result\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/div>\n\n    <script>\n        const fromUnitSelect = document.getElementById('fromUnit');\n        const fromValueInput = document.getElementById('fromValue');\n        const toUnitSelect = document.getElementById('toUnit');\n        const convertButton = document.getElementById('convertButton');\n        const resultDiv = document.getElementById('result');\n\n        const conversionFactors = {\n            nanoseconds: 1,\n            microseconds: 1000,\n            milliseconds: 1000000,\n            seconds: 1000000000,\n            minutes: 60000000000,\n            hours: 3600000000000,\n            days: 86400000000000\n        };\n\n        convertButton.addEventListener('click', () => {\n            const fromUnit = fromUnitSelect.value;\n            const toUnit = toUnitSelect.value;\n            const fromValue = parseFloat(fromValueInput.value) || 0;\n\n            const result = (fromValue * conversionFactors[fromUnit]) \/ conversionFactors[toUnit];\n\n            resultDiv.textContent = `\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: ${result}`;\n        });\n    <\/script>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0418\u0437: \u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b\u041c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b\u0421\u0435\u043a\u0443\u043d\u0434\u044b\u041c\u0438\u043d\u0443\u0442\u044b\u0427\u0430\u0441\u044b\u0414\u043d\u0438 \u0412: \u041d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b\u041c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b\u0421\u0435\u043a\u0443\u043d\u0434\u044b\u041c\u0438\u043d\u0443\u0442\u044b\u0427\u0430\u0441\u044b\u0414\u043d\u0438 \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/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-318","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.qrngua.website\/index.php?rest_route=\/wp\/v2\/pages\/318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qrngua.website\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.qrngua.website\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.qrngua.website\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qrngua.website\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=318"}],"version-history":[{"count":5,"href":"https:\/\/www.qrngua.website\/index.php?rest_route=\/wp\/v2\/pages\/318\/revisions"}],"predecessor-version":[{"id":323,"href":"https:\/\/www.qrngua.website\/index.php?rest_route=\/wp\/v2\/pages\/318\/revisions\/323"}],"wp:attachment":[{"href":"https:\/\/www.qrngua.website\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}