示例#1
0
/**
 *
 * @param float $hour_float Mathematically safe hour representation (e.g. 5.5)
 * @return string Human readable hour representation (e.g. 5:30)
 * @abstract Converts Hour-Floats into human readable time
 */
function hour_float_readable($hour_float)
{
    // Input: 5.5, Output: 5:30
    $remainder = $hour_float - floor($hour_float);
    $hours = $hour_float - $remainder;
    $minutes = $remainder * 60;
    return $hours . ":" . zero_fill($minutes, 2);
}
示例#2
0
	<td>
<?php 
echo nl2br($company['invoice_address']);
?>
	</td>
	<td align="right">
Print Date: <?php 
echo local_date($invoice['created']);
?>
<br />
Due Date: <?php 
echo local_date($invoice['duedate']);
?>
<br />
Invoice #: <?php 
echo zero_fill($invoice['id'], 5);
?>
	</td>
  </tr>
  <tr>
    <td><br /><br /><strong>Bill To</strong>: <?php 
echo $invoice['client_name'];
?>
<br />&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2"><table id="workdata" width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="62%"><strong>Notes</strong></td>
        <td width="10%"><strong>Date</strong></td>