{"id":325,"date":"2024-04-19T13:06:03","date_gmt":"2024-04-19T13:06:03","guid":{"rendered":"https:\/\/calcuconvertonline.com\/?page_id=325"},"modified":"2024-04-19T13:35:17","modified_gmt":"2024-04-19T13:35:17","slug":"time-calculator-2","status":"publish","type":"page","link":"https:\/\/calcuconvertonline.com\/index.php\/time-calculator-2\/","title":{"rendered":"Time Calculator-2"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>Time Calculator<\/title>\n<style>\n    body {\n        font-family: Arial, sans-serif;\n        background-color: #f4f4f4;\n        margin: 0;\n        padding: 0;\n        justify-content: center;\n        align-items: center;\n        height: 100vh;\n    }\n\n    .calculator {\n        background-color: #fff;\n        border-radius: 8px;\n        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n        padding: 20px;\n        text-align: center;\n        max-width: 400px;\n        width: 100%;\n    }\n\n    .input-group {\n        margin-bottom: 20px;\n    }\n\n    input[type=\"time\"] {\n        padding: 8px;\n        border: 1px solid #ccc;\n        border-radius: 4px;\n        font-size: 16px;\n    }\n\n    .result {\n        font-size: 24px;\n        font-weight: bold;\n    }\n\n    button {\n        padding: 10px 20px;\n        font-size: 16px;\n        background-color: #4CAF50;\n        color: white;\n        border: none;\n        border-radius: 4px;\n        cursor: pointer;\n        transition: background-color 0.3s;\n    }\n\n    button:hover {\n        background-color: #45a049;\n    }\n<\/style>\n<\/head>\n<body>\n<div class=\"calculator\">\n    <h2>Time Calculator<\/h2>\n    <div class=\"input-group\">\n        <label for=\"start-time\">Start Time:<\/label><br>\n        <input type=\"time\" id=\"start-time\" value=\"09:23\"><br>\n    <\/div>\n    <div class=\"input-group\">\n        <label for=\"end-time\">End Time:<\/label><br>\n        <input type=\"time\" id=\"end-time\" value=\"17:30\"><br>\n    <\/div>\n    <button onclick=\"calculate()\">Calculate<\/button>\n    <button onclick=\"reset()\">Reset<\/button>\n    <div class=\"result\" id=\"result\"><\/div>\n<\/div>\n\n<script>\n    function calculate() {\n        var startTime = document.getElementById('start-time').value;\n        var endTime = document.getElementById('end-time').value;\n\n        var start = parseTime(startTime);\n        var end = parseTime(endTime);\n\n        var diff = end - start;\n\n        \/\/ Handle negative time difference (when end time is before start time)\n        if (diff < 0) {\n            diff += 24 * 60 * 60 * 1000; \/\/ Add 24 hours in milliseconds\n        }\n\n        var hours = Math.floor(diff \/ (60 * 60 * 1000));\n        var minutes = Math.floor((diff % (60 * 60 * 1000)) \/ (60 * 1000));\n\n        var result = \"Hours: \" + hours + \", Minutes: \" + minutes;\n        document.getElementById('result').innerHTML = result;\n    }\n\n    function parseTime(time) {\n        var parts = time.split(\":\");\n        var hours = parseInt(parts[0], 10);\n        var minutes = parseInt(parts[1], 10);\n\n        return hours * 60 * 60 * 1000 + minutes * 60 * 1000;\n    }\n\n    function reset() {\n        document.getElementById('start-time').value = \"09:23\";\n        document.getElementById('end-time').value = \"17:30\";\n        document.getElementById('result').innerHTML = \"\";\n    }\n<\/script>\n<\/body>\n<\/html>\n\n\n\n<p><strong>About Time Calculator<\/strong><\/p>\n\n\n\n<p>The Time Calculator is a simple tool designed to help users calculate the difference between two time values. It allows users to input the start and end times and then calculates the time difference in hours and minutes. The tool is useful for various purposes such as calculating work hours, duration of events, or time elapsed between two points.<\/p>\n\n\n\n<p><strong>How to Use:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Input Start Time:<\/strong> Enter the start time in the \"Start Time\" field. Use the HH:MM format (e.g., 09:23) without specifying AM\/PM.<\/li>\n\n\n\n<li><strong>Input End Time:<\/strong> Enter the end time in the \"End Time\" field using the same format.<\/li>\n\n\n\n<li><strong>Calculate:<\/strong> Click the \"Calculate\" button to calculate the time difference between the start and end times.<\/li>\n\n\n\n<li><strong>View Result:<\/strong> The calculated time difference will be displayed in hours and minutes below the buttons.<\/li>\n\n\n\n<li><strong>Reset:<\/strong> To clear the input fields and result, click the \"Reset\" button.<\/li>\n<\/ol>\n\n\n\n<p>This tool simplifies the process of calculating time differences, making it easy to manage time-related calculations in various scenarios.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Time Calculator Time Calculator Start Time: End Time: Calculate Reset About Time Calculator The Time Calculator is a simple tool designed to help users calculate the difference between two time values. It allows users to input the start and end times and then calculates the time difference in hours and minutes. The tool is useful [&hellip;]<\/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-325","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/comments?post=325"}],"version-history":[{"count":6,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/325\/revisions"}],"predecessor-version":[{"id":334,"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/pages\/325\/revisions\/334"}],"wp:attachment":[{"href":"https:\/\/calcuconvertonline.com\/index.php\/wp-json\/wp\/v2\/media?parent=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}