在递增数字中找到第一个1/2然后第一个整体

I'm using php to run through a list of dates. Each date that is a weekday is being assigned a percentage of 1 then incremented by the percentage.

I need to be able to flag the first increment equal to or above .5 then the first increment equal to or above 1, then subsequently equal to or above .5 then the same for each whole number.

The problem I am having trouble with is not really finding the number to mark, but to ignore the result until it comes up again.

I can not round more than I have as rounding past that in the long run will hurt either party in a different way.

Here is the output of a small part of what I have in hopes that it makes more sense.

2011-03-06 Weekend 
2011-03-07 Earned: 0.096154 Accrued: 0.096154
2011-03-08 Earned: 0.096154 Accrued: 0.192308
2011-03-09 Earned: 0.096154 Accrued: 0.288462
2011-03-10 Earned: 0.096154 Accrued: 0.384615
2011-03-11 Earned: 0.096154 Accrued: 0.480769
2011-03-12 Weekend 
2011-03-13 Weekend 
2011-03-14 Earned: 0.096154 Accrued: 0.576923 <- should be marked
2011-03-15 Earned: 0.096154 Accrued: 0.673077
2011-03-16 Earned: 0.096154 Accrued: 0.769231
2011-03-17 Earned: 0.096154 Accrued: 0.865385
2011-03-18 Earned: 0.096154 Accrued: 0.961538
2011-03-19 Weekend 
2011-03-20 Weekend 
2011-03-21 Earned: 0.096154 Accrued: 1.057692 <- should be marked
2011-03-22 Earned: 0.096154 Accrued: 1.153846
2011-03-23 Earned: 0.096154 Accrued: 1.25
2011-03-24 Earned: 0.096154 Accrued: 1.346154
2011-03-25 Earned: 0.096154 Accrued: 1.442308
2011-03-26 Weekend 
2011-03-27 Weekend 
2011-03-28 Earned: 0.096154 Accrued: 1.538462 <- should be marked 
2011-03-29 Earned: 0.096154 Accrued: 1.634615
2011-03-30 Earned: 0.096154 Accrued: 1.730769
2011-03-31 Earned: 0.096154 Accrued: 1.826923
2011-04-01 Earned: 0.096154 Accrued: 1.923077
2011-04-02 Weekend 
2011-04-03 Weekend 
2011-04-04 Earned: 0.096154 Accrued: 2.019231 <- should be marked
2011-04-05 Earned: 0.096154 Accrued: 2.115385
2011-04-06 Earned: 0.096154 Accrued: 2.211538
2011-04-07 Earned: 0.096154 Accrued: 2.307692
2011-04-08 Earned: 0.096154 Accrued: 2.403846
2011-04-09 Weekend 
2011-04-10 Weekend 
2011-04-11 Earned: 0.096154 Accrued: 2.5  <- should be marked
2011-04-12 Earned: 0.096154 Accrued: 2.596154
2011-04-13 Earned: 0.096154 Accrued: 2.69230

Adding the requested code. There is a lot of output here, so I can see what it's doing. that will be removed once I know that it's doing what I need it to do.

Note on $x It's static here, but will be dynamic, so I have to be concerned that the first decimal point may not always have a 5 in it to tell me it's about 1/2

$startDate = '2011-01-01';
$x= 25/260; 
$y = 0;

while (strtotime($startDate) <= strtotime($today)) {

echo $startDate;
    if(is_weekday($startDate)) {
    $y = $x+$y;
    print ' Earned: '.round($x,6).' Accrued: '.round($y,6).'<br />';
    } else {
    print ' Weekend <br />';
    } 
$startDate = date ('Y-m-d', strtotime('+ 1 day', strtotime($startDate)));
}

Set a counter to 1. Proceed until you find a value greater than or equal to counter * 0.5. Mark it, increment the counter by 1 and repeat.

$count = 1;
while(your loop for displaying said content, foreach() maybe)
{

   echo "{$timestamp} Earned: {$earned} Accrued: {$accrued}";
   if($accrued > ($count * 0.5)) { echo "<- should be marked"; $count++;}
   echo "<br/>";

}