<!DOCTYPE html>
<html>
<head>
    <title>Date Calculation Debug</title>
</head>
<body>
    <h2>Date Calculation Debug</h2>
    <div id="output"></div>

    <script>
    const startDate = '2026-03-10'; // March 10, 2026
    
    // Method 1: Direct calculation
    const now1 = new Date();
    const start1 = new Date(startDate);
    console.log('Now (raw):', now1);
    console.log('Start (raw):', start1);
    
    // Method 2: With midnight normalization
    const now2 = new Date();
    const start2 = new Date(startDate);
    now2.setHours(0, 0, 0, 0);
    start2.setHours(0, 0, 0, 0);
    
    console.log('Now (normalized):', now2);
    console.log('Start (normalized):', start2);
    
    const timeDiff = start2 - now2;
    const daysUntil = Math.floor(timeDiff / (1000 * 60 * 60 * 24));
    
    const output = `
        <p><strong>Today:</strong> ${now2.toDateString()}</p>
        <p><strong>Rental Start:</strong> ${start2.toDateString()}</p>
        <p><strong>Time Difference (ms):</strong> ${timeDiff}</p>
        <p><strong>Days Until Start:</strong> ${daysUntil}</p>
        <p><strong>Expected Penalty (4 days):</strong> 25%</p>
    `;
    
    document.getElementById('output').innerHTML = output;
    </script>
</body>
</html>