<commit_before><h2>My Regular Savings Accounts</h2>
<hr>
<?php
if (isset($records)) : foreach ($records as $row) : ?>

    <h2>Account Name</h2>
    <p><?php echo $row->bank_name; ?></p>

    <h2>Interest Rate</h2>
    <p><?php echo $row->interest; ?>%</p>

    <h2>Monthly Deposits</h2>
    <p>£<?php echo $row->monthly_deposits; ?></p>

    <h2>Age Of Account</h2>
    <?php
    $start_time = $row->start_date;
    $date1 = new DateTime('now');
    $date2 = new DateTime($start_time);
    echo $date1->diff($date2)->format
    ("%y years, %m months, %d days, %h hours, %i minuets and %s seconds");
    ?>
    <h2>Account Maturity</h2>
    <?php
    $remain = $row->length - (int)$date1->diff($date2)->format("%d");
    ?>
    <p>Days Till Account Maturity = <?php echo $remain; ?> Days</p>


    <h2>Total Balance To Date</h2>
    <?php
    $p = 0;
    $i = $row->interest;
    $c = $row->compound_frequency;
    $n = (int)$date1->diff($date2)->format("%m");
    $r = $row->monthly_deposits;

    $x = $i / $c;
    $z = $n / 12;
    $y = pow((1 + $x), ($z * $c));

    if($p!=0)
    {
        $vf = $p * $y + ($r * ($y - 1) / $x);
    }
    else
    {
        $vf = 1 + $y + ($r * ($y - 1) / $x);
    }

//    $vf = ceil(1.1);

    $k = $vf / 100;
    echo ceil ("{$k}"); // results 102.16
    ?>
    <p>£<?php echo ceil ("{$k}"); ?></p>

    <h2>Interest Earned To Date</h2>
    <?php
     $total_int = $row->monthly_deposits * (int)$date1->diff($date2)->format("%m");
    $w =  $vf - $total_int;

    echo ceil($w);
    ?>


<?php endforeach; ?>

<?php else : ?>
    <h3>You Have No Accounts</h3>
    <h4>Why No Add A Account?</h4>
<?php endif; ?>

<commit_msg>changed leth input from years to days<commit_after><h2>My Regular Savings Accounts</h2>
<hr>
<?php
if (isset($records)) : foreach ($records as $row) : ?>

    <h2>Account Name</h2>
    <p><?php echo $row->bank_name; ?></p>

    <h2>Interest Rate</h2>
    <p><?php echo $row->interest; ?>%</p>

    <h2>Monthly Deposits</h2>
    <p>£<?php echo $row->monthly_deposits; ?></p>

    <h2>Age Of Account</h2>
    <?php
    $start_time = $row->start_date;
    $date1 = new DateTime('now');
    $date2 = new DateTime($start_time);
    echo $date1->diff($date2)->format
    ("%y years, %m months, %d days, %h hours, %i minuets and %s seconds");
    ?>
    <h2>Account Maturity</h2>
    <?php
    $remain = $row->length - (int)$date1->diff($date2)->format("%d");
    ?>
    <p>Days Till Account Maturity = <?php echo $remain; ?> Days</p>


    <h2>Total Balance To Date</h2>
    <?php
    $p = 0;
    $i = $row->interest;
    $c = $row->compound_frequency;
    $n = (int)$date1->diff($date2)->format("%m");
    $r = $row->monthly_deposits;

    $x = $i / $c;
    $z = $n / 12;
    $y = pow((1 + $x), ($z * $c));

    if($p!=0)
    {
        $vf = $p * $y + ($r * ($y - 1) / $x);
    }
    else
    {
        $vf = 1 + $y + ($r * ($y - 1) / $x);
    }

//    $vf = ceil(1.1);
    $k = $vf / 100;
    echo ceil ("{$k}"); // results 102.16
    ?>

    <p>£<?php echo  $vf; ?></p>

    <h2>Interest Earned To Date</h2>
    <?php
     $total_int = $row->monthly_deposits * (int)$date1->diff($date2)->format("%m");
    $w =  $vf - $total_int;

    echo ceil($w);
    ?>


<?php endforeach; ?>

<?php else : ?>
    <h3>You Have No Accounts</h3>
    <h4>Why No Add A Account?</h4>
<?php endif; ?>


{'fraction_non_alphanumeric': 0.23736920777279522, 'fraction_numerical': 0.028699551569506727, 'mean_word_length': 2.4388489208633093, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 125, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2535812', 'n_tokens_mistral': 1455, 'n_tokens_neox': 1387, 'n_words': 317}